> For the complete documentation index, see [llms.txt](https://jamiewen00.gitbook.io/ai-engineering-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jamiewen00.gitbook.io/ai-engineering-handbook/fundamentals/layers.md).

# Tech Stack

AI Engineering (AIE) builds apps using existing foundation models. APIs made them easy to use. AIE exploded.

## Three Layers

Three layers make the AI stack:

<figure><img src="/files/qcZzKfeJydZqbirywWer" alt="ai engineer"><figcaption></figcaption></figure>

1. <mark style="background-color:purple;">Application</mark> Layer- Product companies turn capabilities into user value
2. <mark style="background-color:purple;">Infrastructure</mark> Layer - Infra companies make capabilities accessible and scalable
3. <mark style="background-color:purple;">Model</mark> Layer - Model companies create foundational capabilities

Big Tech companies and AI startups may focus on all three layers

<figure><img src="/files/kILtMizTj2G1SCYV2kaa" alt="ai engineer"><figcaption></figcaption></figure>

<figure><img src="/files/UnNaNiMdleqKjs16g3l8" alt="ai engineer"><figcaption></figcaption></figure>

whereas AI Engineering in other companies focuses on the **Application** layer.

## Companies

**Product Companies** build user-facing apps. Deploy fast. Iterate based on feedback. Examples include [Cursor](https://www.cursor.sh/), [GitHub Copilot](https://copilot.github.com/), [Devin AI](https://www.cognition-labs.com/devin), [Lindy](https://www.lindy.ai/), [Cursor](https://www.cursor.com/), and [Bland](https://www.bland.ai/).

**Infrastructure Companies** provide tools for product teams. B2B focus. Built for scale and reliability.

* **Inference Providers** serve models through APIs. [OpenRouter](https://openrouter.ai/), [Together AI](https://www.together.ai/), [Cohere](https://cohere.com/), [Amazon Bedrock](https://aws.amazon.com/bedrock/), [Hugging Face](https://huggingface.co/), [Google Vertex AI](https://cloud.google.com/vertex-ai), [Replicate](https://replicate.com/), [Fireworks AI](https://fireworks.ai/).
* **Database Providers** serve AI-optimised retrieval. [Pinecone](https://www.pinecone.io/), [Weaviate](https://weaviate.io/), [Qdrant](https://qdrant.tech/), [Chroma](https://www.trychroma.com/).
* **Observability Providers** monitor and evaluate performance. [Galileo](https://galileo.ai/), [Phoenix](https://phoenix.arize.com/), [Langfuse](https://langfuse.com/), [Opik](https://www.comet.com/site/products/opik/), [LangSmith](https://www.langchain.com/langsmith).
* Evaluation Frameworks assess various aspects of LLM performance, such as correctness, faithfulness, and safety, using metrics like answer relevancy, hallucination detection, and task completion

**Model Companies** create foundation models. [Google](https://deepmind.google/models/gemini/), [Meta](https://www.llama.com/), [Anthropic](https://www.anthropic.com/), [OpenAI](https://openai.com/), [Mistral AI](https://mistral.ai/), [xAI](https://x.ai/), [Stability AI](https://stability.ai/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jamiewen00.gitbook.io/ai-engineering-handbook/fundamentals/layers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
