This project implements an Agentic RAG (Retrieval-Augmented Generation) workflow designed for reading internal technical documentation. Currently, the public WixQA benchmark is used for testing and optimization. It employs a ReAct agent, Milvus for vector storage, and NVIDIA NIM for LLM and Information Retrieval services.
The core configuration is located at:
examples/RAG/simple_rag/configs/wix_config.yml
- Agent Architecture: ReAct Agent (
_type: react_agent) - LLM:
qwen/qwen3-next-80b-a3b-instruct(via NVIDIA NIM) - Embeddings:
nvidia/nv-embedqa-e5-v5(via NVIDIA NIM) - Reranker:
nvidia/llama-3.2-nv-rerankqa-1b-v2(via NVIDIA NIM) - Vector Database: Milvus
- Memory: Mem0 (
saas_memory)
- wix_retriever_tool_with_rerank: Retrieves information from the Wix Help Center knowledge base with re-ranking capability using
nvidia/llama-3.2-nv-rerankqa-1b-v2. - vllm_retriever_tool: Retrieves information about vLLM.
- web_search_tool: Performs internet searches using Tavily.
- code_generation_tool: Generates Python code.
- Memory Tools:
add_memoryandget_memoryfor managing long-term user preferences.
-
Environment Setup: Ensure you are in the project root and activate the virtual environment:
cd NeMo-Agent-Toolkit source .venv/bin/activate
-
Install Dependencies:
uv pip install -e '.[langchain]' uv sync --all-groups --all-extras -
Docker Services: Start the Milvus vector database:
docker compose -f examples/deploy/docker-compose.milvus.yml up -d
Note: You may need to bootstrap data into Milvus if not already present (e.g., using
scripts/bootstrap_milvus.sh). -
API Keys: Ensure your environment variables are set (e.g., in a
.envfile):NVIDIA_API_KEYTAVILY_API_KEY(if using web search)
To run the agent with a specific query:
nat run --config_file examples/RAG/simple_rag/configs/wix_config.yml --input "How do I change my site's color palette in ADI?"To start a FastAPI server for the workflow:
nat serve --config_file examples/RAG/simple_rag/configs/wix_config.yml --host 0.0.0.0 --port 8001 --workers 4API Documentation will be available at: http://localhost:8001/docs
You can test the running server with curl:
curl --request POST \
--url http://localhost:8001/generate \
--header 'Content-Type: application/json' \
--data '{
"input_message": "Can I start accepting payments on my site while my Wix Payments account is still under verification?",
"use_knowledge_base": true
}'To run the frontend UI:
-
Navigate to the UI directory:
cd external/nat-ui -
Install dependencies:
npm ci
-
Start the development server:
PORT=8000 npm run dev
-
Access the UI in your browser at
http://localhost:8000.
To evaluate the workflow using the defined metrics (Accuracy, Groundedness, Relevance, Trajectory Accuracy):
nat eval --config_file examples/RAG/simple_rag/configs/wix_config.ymlTo run the prompt optimizer (using Genetic Algorithm):
nat optimize --config_file examples/RAG/simple_rag/configs/wix_config.ymlFor a complete list of commands and testing flows, refer to:
NeMo-Agent-Toolkit/my_scripts/test_workflow.sh