> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bindai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 05.1 overview

# Knowledge Overview

Knowledge allows BindAI agents to retrieve information from external sources instead of relying only on the language model's built-in knowledge.

This enables agents to answer questions using your own documents, manuals, APIs, databases, or business information.

Knowledge is the foundation of Retrieval-Augmented Generation (RAG).

***

# What is Knowledge?

Knowledge represents information that exists outside the language model.

Examples include:

* company documentation
* PDF files
* product manuals
* knowledge bases
* internal wikis
* databases
* websites

Instead of memorizing this information, the agent retrieves it when needed.

***

# Why Use Knowledge?

Language models have limitations:

* training data becomes outdated
* they do not know your private information
* they cannot access proprietary documentation by default

Knowledge solves these problems by providing relevant information at runtime.

***

# Knowledge Architecture

A typical knowledge pipeline looks like this:

```text id="b7f2ka" theme={null}
User Question

↓

Retriever

↓

Knowledge Source

↓

Relevant Documents

↓

Language Model

↓

Response
```

The language model generates answers using both the user's prompt and the retrieved information.

***

# Example

Suppose your company has an internal policy document.

User:

```text id="n4y8wr" theme={null}
What is our vacation policy?
```

Instead of guessing, the agent retrieves the policy document and answers using its contents.

***

# Knowledge Sources

Knowledge can originate from many places.

Common sources include:

* Markdown documents
* PDFs
* Word documents
* databases
* REST APIs
* vector databases
* cloud storage
* custom repositories

BindAI is designed so these sources can be integrated without changing the agent interface.

***

# Retrieval

Knowledge is typically retrieved rather than loaded entirely.

Instead of sending hundreds of documents to the model:

```text id="m8k3dh" theme={null}
Question

↓

Search

↓

Top Matches

↓

Language Model
```

Only the most relevant information is included in the prompt.

This keeps prompts efficient and improves response quality.

***

# Knowledge vs Memory

Knowledge and Memory serve different purposes.

| Knowledge            | Memory                |
| -------------------- | --------------------- |
| External information | Conversation history  |
| Usually shared       | Usually user-specific |
| Mostly static        | Continuously updated  |
| Documents and data   | Previous interactions |

Use Knowledge to answer factual questions.

Use Memory to remember previous conversations.

***

# Knowledge vs Variables

Workflow variables exist only during execution.

Knowledge exists independently of any workflow.

| Workflow Variables | Knowledge              |
| ------------------ | ---------------------- |
| Temporary          | Persistent             |
| Execution state    | External information   |
| Runtime values     | Documents and datasets |

***

# Knowledge in Agents

Agents can be connected to a knowledge source.

Conceptually:

```python id="k5d9qp" theme={null}
agent.use_knowledge(
    knowledge,
)
```

When configured, the execution pipeline retrieves relevant information before generating a response.

***

# Knowledge in Workflows

Knowledge is also available inside workflows.

```text id="q2w7ye" theme={null}
Start

↓

Knowledge Retrieval

↓

Agent

↓

End
```

Workflow nodes can retrieve information before passing it to downstream agents.

***

# Common Use Cases

Knowledge is commonly used for:

* customer support assistants
* documentation search
* internal company chatbots
* legal assistants
* product support
* technical manuals
* enterprise knowledge bases

***

# Benefits

Using external knowledge provides:

* up-to-date responses
* private information access
* fewer hallucinations
* domain-specific expertise
* improved factual accuracy
* scalable information retrieval

***

# Best Practices

* Keep documents well organized.
* Use retrieval instead of loading everything.
* Remove outdated information.
* Separate Knowledge from Memory.
* Use embeddings for semantic search.
* Keep retrieved context concise.

***

# Summary

Knowledge allows BindAI agents to answer questions using information that exists outside the language model.

Rather than depending solely on pretrained knowledge, agents retrieve relevant content from external sources and include it in the generation process, enabling accurate, current, and organization-specific responses.
