https://retellai.com/?utm_source=discord&utm_medium=seo logo
can you put function tools in a knowledge base doc...
# ❓・ai-evy-support
p
@AI Evy can you put function tools in a knowledge base document?
a
Thanks for tagging me @papakojo_12. I'll look through relevant sources and get back to you shortly.
### Answer No, you cannot put function tools directly in a knowledge base document [(1) ]() . Function tools and knowledge bases are separate components in Retell AI [(2) ]() [(1) ]() . Function tools are configured in the agent's dashboard under the "Functions" section and include pre-defined tools like end call, transfer call, and custom functions [(2) ]() . Knowledge bases are used to add text, URLs, and files as sources of information for your agent [(1) ]() . The knowledge base accepts
knowledge_base_texts
,
knowledge_base_urls
, and
knowledge_base_files
as sources, but not function definitions . Function tools must be configured separately through the dashboard or API as part of your agent's tool configuration [(2) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Add Knowledge Base Sources](https://docs.retellai.com/api-references/add-knowledge-base-sources) [[2] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can i say the system prompt in the knowledge base but just mentio the function tools in the system prompt?
a
Thanks for the follow-up, @papakojo_12. I'll get back to you soon.
### Answer Based on the documentation, no - you should not put system prompts in knowledge bases [(1) ]() . The knowledge base is specifically designed to provide contextual information that your agent can access during calls, not for instructions or prompts . The documentation clearly states that "the knowledge base is intended to supply supporting information to the agent, so it should not be used to provide instructions or prompts to the agent. Instead, use the agent's prompt for that purpose" . For system prompts and function tool instructions, you should use: 1. General prompt - This is where you put your main system instructions [(2) ]() 2. State prompts - For state-specific instructions if using multi-prompt agents 3. Function descriptions - When configuring individual tools, you can add specific instructions about when to use each function [(3) ]() For example, when adding a custom function, it's recommended to "include in the prompt explicitly when is the best time to invoke the custom function" . Similarly, for end call functionality, you would "enhance the agent's understanding by incorporating the end call conditions into the prompt" [(4) ]() . The knowledge base will automatically be retrieved and appended to the LLM prompt under the header "///## Related Knowledge Base Contexts" when relevant information is found [(1) ]() , but it shouldn't contain your core system instructions.
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[4] End call](https://docs.retellai.com/build/single-multi-prompt/end-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.