plano/demos/use_cases/rag_agent
2025-11-24 15:02:52 -08:00
..
src/rag_agent agents framework demo 2025-11-24 15:02:52 -08:00
arch_config.yaml agents framework demo 2025-11-24 15:02:52 -08:00
docker-compose.yaml agents framework demo 2025-11-24 15:02:52 -08:00
pyproject.toml agents framework demo 2025-11-24 15:02:52 -08:00
README.md agents framework demo 2025-11-24 15:02:52 -08:00
sample_queries.md agents framework demo 2025-11-24 15:02:52 -08:00
start_agents.sh agents framework demo 2025-11-24 15:02:52 -08:00
test.rest agents framework demo 2025-11-24 15:02:52 -08:00
uv.lock agents framework demo 2025-11-24 15:02:52 -08:00

RAG Agent Query Parser

A FastAPI service that rewrites user queries using archgw and gpt-4o-mini for better retrieval accuracy.

How it Works

  1. Receives a chat completion request with conversation history
  2. Calls archgw's LLM gateway with gpt-4o-mini to rewrite the last user query
  3. Returns the rewritten query as the assistant response

Setup and Running

  1. Start archgw:

    archgw up --foreground
    
  2. Start the query parser service:

    uv run python -m rag_agent.query_parser
    

Configuration

# archgw LLM Gateway base URL (default: http://localhost:12000/v1)
export LLM_GATEWAY_ENDPOINT="http://localhost:12000/v1"