Cognitive Architecture in applications (episode 1)
Tags: ai, llm, architecture, development
Published: 2024-01-05 12:39:03

---
title: Cognitive Architecture in applications (episode 1)
published: true
description: Understand Cognitive Architecture to build smart applications
tags: ai, llm, architecture, development
series: Cognitive Architecture in smart applications
---

The raise of AI and in particular of the [LLM], has started a race to create groundbreaking  applications that use Al to deliver innovative and disruptive services. But before exploring the architecture behind such applications, let's first understand our role in this emerging field. This will help us determine if learning such architecture can be really useful for our objectives.


## What is our role in AI landscape ?

To clarify our role in the AI landscape, we need to determine if we are AI users or AI developers. The diagram below illustrates the different aspects of the AI landscape, specifically focusing on the [OpenAI] ecosystem (although this can be generalised to other AI providers). By understanding our goals with AI, we can identify the specific role we need to take on.

![AI landscape by role](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlwwasfpra5e2l58lthh.png)

### AI User
> An AI user interacts with AI assistants (ie Chat) where the main problem is to submit the right questions to have the expected answers, relying on the capabilities of the assistants itself

### AI Developer
> an AI developer works with AI services (ie API) where the main problem is to orchestrate such services inside applications to deliver innovative and disruptive services. 

Obviously the greater part of usage of AI, currently, is as consumers using [ChatGPT], [Bard] (aka Gemini), [Copilot], etc… In terms of cloud tiers, this falls under the [Software as a Service (SaaS)][saas] category. However, as developers, we should also consider the [Platform as a Service (PaaS)][paas] category and choose the appropriate frameworks and tools for building solutions.

So  the question is: "Are we ready to embrace AI development and add new smart services to our applications through AI models?".

If answer is yes, we have to start learning the new emerging cognitive architecture and its patterns to be ready for the new development challenges that AI and in particular the [large language models (LLM)][LLM] are putting in front of us.

## The Cognitive Architecture

These new smart applications require a new approach of development to maximise the use of AI capabilities. As a result, a new application architecture that incorporates [LLM] has been developed, with a focus on:

> * **how provide context to the application**
> * **how does the application “_<u>reason</u>_” over it**
> * **how application use outcome from reasoning**

The methods and patterns used to complete these tasks are referred to as the **<u>cognitive architecture</u> of an application** which is a  cool term to describe this new kind of smart applications. 

### PaaS vs MaaS

As AI developer  we have to consider accessing to AI models using [PaaS] services but we must keep in mind that a new ad-hoc tier is coming to play that is **<u>Model as a Service (MaaS)</u>**. **MaaS** is an emerging concept in cloud eco-system that allows access to a variety of pre-built, pre-trained machine learning models in a standardised manner. These models cover a wide range of AI tasks simplifing the process of integrating AI capabilities into applications.

### Conclusion 

Well, in this article we have just introduced the Cognitive Architecture concept and the challenges that we will face as AI developer of smart application. In the next article, we will explore bit more the cognitive architecture, including the most commonly used patterns and when and how to apply them to popular use cases. In the meanwhile ... happy "cognitive" coding! 👋

### References

* [OpenAI's Bet on a Cognitive Architecture](https://blog.langchain.dev/openais-bet-on-a-cognitive-architecture/)

***

_Originally published at [https://bsorrentino.github.io](https://bsorrentino.github.io/bsorrentino/ai/2024/01/04/Cognitive-Architecture-episode1.html) on January 4, 2024._

[saas]: https://en.wikipedia.org/wiki/Software_as_a_service
[paas]: https://en.wikipedia.org/wiki/Platform_as_a_service
[ChatGPT]: https://chat.openai.com/
[Bard]: https://bard.google.com/chat
[Copilot]: https://copilot.microsoft.com/
[OpenAI]: https://openai.com/
[article1]: https://blog.langchain.dev/openais-bet-on-a-cognitive-architecture/
[LLM]: https://en.wikipedia.org/wiki/Large_language_model