← GitHub

GitHub·3 min read

8hjkkwikl8/ai-portfolio

You’ll see concrete code for building traceable RAG, measuring prompt quality, and safely converting natural language to SQL.

The repository contains three runnable AI engineering projects, each focused on a different problem space. The most striking fact is that the RAG demo includes built‑in traceability, letting you follow every retrieved chunk through the generation step. All three demos are written in Python and have attracted 44 stars on GitHub.

The traceable RAG project stitches together a vector store, a retriever, and a language model, then logs each retrieval event with identifiers that later appear in the model’s output. This design lets developers audit which documents influenced a response, a feature often missing from vanilla RAG pipelines. The code uses standard libraries like LangChain and FAISS, so the setup mirrors production‑grade stacks.

The prompt‑evaluation suite runs a batch of test prompts against a chosen model and records metrics such as token usage, response length, and exact match scores. It reads prompts from a CSV, executes them via the OpenAI API, and writes results to a JSON file for downstream analysis. The NL2SQL analyzer adds a guard layer: it first validates the natural‑language query against a whitelist of allowed operations before translating it to SQL, preventing injection attacks.

If you are building a retrieval‑augmented product, you can copy the traceability hooks to audit model decisions in real time. Prompt engineers can adopt the evaluation framework to benchmark new prompt templates without writing custom scripts. Teams handling sensitive data can integrate the guarded NL2SQL component to enforce query safety before hitting a database.

TakeawayUse the repo’s ready examples to add traceability, systematic prompt testing, and safe NL2SQL conversion to your AI projects.

Prodigy briefing — continue on the original for source material, discussion, and updates.

View repository ↗