This example demonstrates the "ultimate" usage of the goframe library, integrating several core components:
Repository Ingestion: Uses GitLoader to load the entire source code of this repo.
Code-Aware Splitting: Uses CodeAwareTextSplitter to split files into logical chunks (functions, classes) while maintaining metadata.
Modern Qdrant Features: Uses the refactored Qdrant store with Streaming Integration, Binary Quantization (RAM saving), and Payload Indexing (fast metadata filtering).
Local AI Infrastructure: Uses Docker to run Qdrant v1.16.0 and Ollama with Qwen3 models (qwen3-embedding:0.6b and qwen3-coder).
Prerequisites
Docker and Docker Compose
Go 1.25.6+
How to Run
Start Infrastructure:
docker compose up -d
This will start Qdrant and Ollama, and automatically pull the required models (may take a few minutes depending on your internet connection).
Run the Integration Test:
go run examples/qdrant-ultimate-rag/main.go
What This Test Validates
Memory Safety: The streaming pipeline in AddDocumentsBatch ensures that even a large repository won't cause OOM errors.
Quantization: Verifies that the library correctly configures Qdrant's binary quantization.
RAG Accuracy: Demonstrates that the code-aware splitting and retrieval work in harmony to provide high-quality context to the LLM.
Ollama Integration: Validates the end-to-end flow with state-of-the-art Qwen3 models.