#KB <-> Agent association via API
1 messages · Page 1 of 1 (latest)
Hi, probbaly your KB document is larger than ~300KB. In that case the document can't be inserted into the prompt and can be used only as RAG.
To use properly the RAG feature, you should:
- Enable RAG in the agent config
- Upload your KB document
- You can use the knowledgebase in RAG, only after it's indexed. Since the indexing may take a long time, it's not part of the upload document endpoint, but part of a separated endpoint POST /v1/convai/knowledge-base/{documentation_id}/rag-index where you specify the embedding model.
Example payload:
"model":"e5_mistral_7b_instruct",
}```
After you hit this endpoint, you start the indexing job. By regular hit of the endpoint, you can track progress of the indexing. Once the indexing is finished you can save your agent with your knowledgebase document.
Thank you, will give it a shot -- is that endpoint documented anywhere?
We are working on the documentation and will be there soon.