Skip to main content

ContextPack

Defined in the models module.
AI Agent Context pack for orchestrator pattern - retrieval without generation. Provides deterministic context that can be passed to Agent.chat_with_context(). Attributes: context: The formatted context string ready for injection citations: List of source citations query: The original query metadata: Additional metadata (timing, retrieval stats, etc.)

Properties

str
No description available.
List[Citation]
No description available.
str
No description available.
Dict[str, Any]
No description available.

Methods

has_citations()

Check if context pack has citations.

format_for_prompt()

Format context for injection into a prompt.
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/rag/models.py at line 78

Context Concept

Context Management

Context Strategies