# How do I make my agent answer from our own documents?

**URL:** <https://community.sparkflows.ai/t/how-do-i-make-my-agent-answer-from-our-own-documents/368>\
**Category:** Agentic AI\
**Tags:** faq, genai\
**Created:** [November 5, 2026, 9:50am UTC](https://community.sparkflows.ai/t/how-do-i-make-my-agent-answer-from-our-own-documents/368 "2026-11-05T09:50:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanskar](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Sanskar](https://community.sparkflows.ai/u/Sanskar)\
**Post date:** [November 5, 2026, 9:50am UTC](https://community.sparkflows.ai/t/how-do-i-make-my-agent-answer-from-our-own-documents/368/1 "2026-11-05T09:50:41Z")

</div>

Turn on **Knowledge**. The agent then finds the passages that best match the question and answers from them.

1. In **Agent Studio** open the **Knowledge** group (or the **Context** tab of an Agent Node).
2. Set **Knowledge Base (RAG)** to `true`.
3. Choose the **Knowledge Source** : an index someone already built, or a document path to index.
4. Pick the **Vector Database** (`pinecone` or `pgvector`) and its connection, then the **Index Name** and **Namespace**.

| Setting | Start with |
| --- | --- |
| **Top K** | `3`. Go to `5` only if answers lack detail. |
| **Embedding Model** | The same model the index was built with. |
| **Embedding Dimensions** | Must match the index, e.g. `1536` for `text-embedding-3-small`. |
| **Reranking** | `none`; try `lexical` when chunks are near-duplicates. |

Tell the agent to answer only from the passages, to say when it can’t find the answer, and to cite the source.

If answers ignore your documents, check the namespace and embedding model first. A wrong namespace or model gives vague answers **without** an error.

Knowledge is for documents. For live data such as balances or order status, give the agent a tool instead.

Docs: [RAG and Knowledge](https://docs.sparkflows.ai/en/latest/agentic-ai-guide/building-agents/rag-knowledge.html)
