AIQ#
This example demonstrates how to use NVIDIA’s Context-Aware RAG (CA-RAG) system with AIQ for document processing and question answering. The example shows how to:
Ingest documents using AIQ
Perform question answering using AIQ
Prerequisites#
NVIDIA API Keys:
Get your API key from: build.nvidia.com
Export the following environment variable:
export NVIDIA_API_KEY=your_api_key
Install AIQ and Context-Aware RAG:
Follow the installation instructions in the AIQ Plugin Guide
Make sure you have both AIQ and Context-Aware RAG installed in your environment
Set up pre-requisites containers:
Setup#
Start the AIQ services:
Start Ingestion Service:
aiq serve --config_file=./src/vss_ctx_rag/aiq_config/workflow/config-ingestion-workflow.yml --port 8000
Start Retrieval Service:
aiq serve --config_file=./src/vss_ctx_rag/aiq_config/workflow/config-retrieval-workflow.yml --port 8001
Usage#
Document Ingestion:
Documents are processed and uploaded to the AIQ ingestion service
The system maintains document order
Question Answering:
Send questions to the AIQ retrieval service
Receive answers based on the ingested document content
Example Notebook#
The qna_aiq.ipynb notebook provides a step-by-step walkthrough of the entire process, including:
Service initialization
Document processing and ingestion
Question answering examples
Notes#
Make sure to stop the AIQ services when you’re done by pressing
Ctrl+C
in the terminal windows