agents.rag.llm_rag.exampleยถ

Example usage of the LLM RAG Agent.

from typing import Any This script demonstrates how to: 1. Create and configure an LLM RAG agent 2. Run queries and access the results 3. Customize the agentโ€™s behavior

Functionsยถ

compare_agent_configurations()

Compare different agent configurations side by side.

create_llm_rag_agent([use_relevance_checker, ...])

Creates and configures an LLM RAG agent.

main()

Main function to run the example.

run_example_queries(agent)

Run a set of example queries against the agent.

Module Contentsยถ

agents.rag.llm_rag.example.compare_agent_configurations()ยถ

Compare different agent configurations side by side.

Return type:

None

agents.rag.llm_rag.example.create_llm_rag_agent(use_relevance_checker=True, return_documents=3)ยถ

Creates and configures an LLM RAG agent.

Parameters:
  • use_relevance_checker (bool) โ€“ Whether to include a relevance checking component

  • return_documents (int) โ€“ Number of documents to retrieve

Returns:

Configured agent instance

Return type:

LLMRAGAgent

agents.rag.llm_rag.example.main()ยถ

Main function to run the example.

Return type:

None

agents.rag.llm_rag.example.run_example_queries(agent)ยถ

Run a set of example queries against the agent.

Parameters:

agent (Any) โ€“ The LLM RAG agent to query