Skip to content

Repository files navigation

Personal Intelligence App: RAG-based Chatbot

A personal intelligence engine that turns your portfolio and experience into an interactive, context-aware conversational agent. It uses first-person perspective to answer questions about your background, projects, and experience as if it were you.

Tech Stack

System Architecture

The application follows a RAG (Retrieval-Augmented Generation) pipeline:

RAG System Architecture

How It Works

  1. Ingestion (scripts/loadYaml.ts):

    • Recursively walks career_brain/ directory.
    • Parses YAML files (facts, projects, roles).
    • Generates embeddings using Google's gemini-embedding-001.
    • Stores text chunks + vectors in Astra DB.
  2. Retrieval (lib/astra.ts):

    • On user query, generates a query embedding.
    • Performs a cosine similarity search in Astra DB.
    • Retrieves the top 5 most relevant context chunks.
  3. Generation (app/api/chat/route.ts):

    • Constructs a strict system prompt defining the "Islam Hafez" persona.
    • Injects the retrieved context.
    • Streams the response from Groq's llama-3.3-70b-versatile model.

About

A context-aware Personal Intelligence engine built with Next.js, Gemini 2.0, and Astra DB. Turn my experience into a RAG-powered interactive agent.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages