RAG app via third-party platform: I delivered a production-ready Retrieval-Augmented Generation (RAG) application by orchestrating a third-party AI platform (connectors, embeddings, vector search, simple UI) with OpenAI's ChatGPT API for generation. Users ask natural-language questions about my GitHub project; the app retrieves relevant repo content and produces grounded answers with citations back to specific files or lines.
What "RAG" means: RAG is an LLM pattern where the app first retrieves relevant text from a knowledge base and then generates the answer using those passages as context. This reduces hallucinations and keeps answers current without retraining the model.
My implementation:
- Third-party platform setup: Configured a GitHub connector to sync the repo; enabled automatic parsing, chunking, and metadata capture (file path, language, line ranges, commit hash).
- Embeddings and index: Used the platform's embedding service and vector index; tuned chunk size/overlap and added path or file-type filters.
- Query pipeline: User question → embed query → semantic search (top-k) → optional rerank → platform composes prompt with retrieved passages → calls OpenAI ChatGPT API → UI renders answer with citations.
- Guardrails and ops: Citation-required prompting, max-context limits, API usage/rate-limit handling, scheduled re-index on repo changes, and retrieval hit/miss logging.
Impact: Reduced unsupported claims via source-grounding with citations; delivered interactive answers in seconds versus manual repo search; indexed all targeted code and docs with filterable scope.
Outcomes
- Integrated a third-party AI platform with OpenAI's ChatGPT API to deliver a RAG app over my GitHub repository, enabling natural-language queries with line-level citations.
- Owned the end-to-end retrieval stack (repo sync, parsing and chunking, embeddings, semantic search, reranking) and implemented citation-required prompts for grounded answers.
- Operationalized re-indexing, evaluation questions, and observability for retrieval hit rate, latency, and answer faithfulness.
Architecture:
- Ingest (third-party): GitHub connector → parse → chunk → attach metadata.
- Index (third-party): Embed chunks → upsert to vector index with filters.
- Retrieve (third-party): Embed query → vector search (top-k) → optional rerank.
- Generate (OpenAI API): Third-party app assembles prompt with retrieved context → calls ChatGPT → returns answer with citations.
- Observe (third-party): Logs and dashboards.
Key terms:
- Embedding: Numeric vector representing meaning; similar text → nearby vectors.
- Semantic search: Retrieval by meaning (via embeddings), not just keywords.
- Chunking: Splitting files into smaller passages so retrieval and context windows work well.
- Top-k / Rerank: Select the best k passages; reranking re-orders with a more precise model.
- Context window: The maximum text the model reads at once (instructions plus retrieved chunks).
- Grounding and citations: Answers reference retrieved sources to remain verifiable and reduce hallucinations.
Tech choices: Third-party platform for data connectors, embeddings, vector index, and UI; OpenAI API (ChatGPT and embeddings) for language understanding and generation; scheduled re-index on repo updates and a lightweight evaluation set with expected file hits.
Evaluation and quality: Curated "golden" questions mapped to expected files and tracked retrieval, answer faithfulness and whether cited sources matched what the model read.
Security and privacy: Scoped API keys, repository/path whitelists, sanitized prompts, response restriction to retrieved context, and minimal analytics logging.