Structuring KB documents
Proper document structure improves readability for both humans and AI (GPT models from OpenAI read markdown best, while anthropic models read XML). We recommend using a clear hierarchy with headings, subheadings, and bullet points.
Consistent structure across documents helps the AI agent quickly locate and extract relevant information, leading to more accurate and context-aware responses. To quickly reformat documents, feed the text to an LLM.
Adding Descriptions and Tags
Each of the text ingestion methods explained above all include the following fields to enhance your knowledge baseβs searchability and efficiency:
Document Description
Write a brief (2-3 sentences) summary of the documentβs content. For example:
Tags
Tags Add relevant keywords
that describe the documentβs main topics. For instance:
These descriptions and tags help the LLM understand the context and relevance of each document, improving the accuracy of information retrieval. We recommend doing both for best possible retrieval and output.