- Knowledge Generator — Creates relevant factual information
- Reasoner — Uses generated knowledge to form answers
- Coordinator — Synthesizes multiple reasoning paths into a final answer
Architecture
API Reference
GKPAgent
run() only accepts a single task string (it internally calls the private _run([task])[0]). There is no public batch-processing method that accepts a list of tasks; process each task with a separate run() call if you need to handle multiple queries.
KnowledgeGenerator
Reasoner
Example
Best Practices
- Knowledge Generation: Set appropriate number of knowledge items based on query complexity
- Reasoning Process: Ensure diverse reasoning paths for complex queries. Validate confidence levels.
- Coordination: Review coordination logic for complex scenarios. Validate final answers against source knowledge.
Performance Considerations
- Processing time increases with number of knowledge items
- Complex queries may require more knowledge items
- Consider caching frequently used knowledge
- Monitor token usage for cost optimization