Knowledge resources are suitable for turning unstructured knowledge into retrievable, explainable, and citable graph context. They often work together with data analysis resources: analysis results answer “what happened”, while the knowledge graph helps explain “why” and “based on what”.Documentation Index
Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
Use this file to discover all available pages before exploring further.
Scenario Example
A sales analysis Assistant can access both:semantic_model: query sales amount, order count, and profit.knowledge: retrieve entity relationships from sales policies, product descriptions, customer contracts, and operational review documents.
Recommended Flow
- Register a knowledge resource and bind a GraphRAG-enabled knowledgebase.
- Trigger sync to generate
knowledgebaseandknowledge_entity. - Search key entities in the ontology workspace.
- Use
getEntityNeighborhoodto inspect entity relationships. - Use knowledge graph actions to retrieve chunks, mentions, and evidence.
- Reference evidence summaries in the answer.
Entity Retrieval
UsequeryEntities to search for:
- Product names.
- Policy names.
- Customer names.
- Business topics.
- Concept entities extracted from documents.
Evidence Usage
GraphRAG evidence usually includes:- entity summary.
- relation description.
- mention samples.
- chunk content.
- source metadata.
Controlling Context Size
Knowledge graphs can easily become large. Recommendations:- Use
maxRelationsto limit synced relationship count. - Use
mentionSamplesPerItemto control evidence samples. - Set topK during queries.
- Prefer reading one-hop neighborhoods and expand only when necessary.
- Ask users to confirm low-confidence entities.
Best Practices
- Keep the knowledge base GraphRAG status ready.
- Maintain aliases for important business terms.
- Prioritize high-value documents in the knowledge base.
- Regularly check whether hidden entities need to be synced.
- Show evidence sources in answers and avoid pure natural language speculation.