Skip to content

Jerry-britto/AI-Interview-Coach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 AI Interview Prep Coach with Mem0 Memory

This project demonstrates how to build an AI agent with both short-term and long-term memory using Mem0, LangChain, and Groq. The agent acts as an interview preparation coach, remembering your answers and preferences across sessions.


Features

  • Conversational UI: Chat with an AI interview coach in your browser (Streamlit app)
  • Personalized Memory: Remembers your answers, feedback, and preferences across sessions
  • Memory Engine: Uses Mem0 for memory extraction, storage, and retrieval (vector DB: Qdrant)
  • LLM Integration: Uses Groq (Llama-3) for interview questions and Gemini for embeddings
  • Input & Output validation: Checking the input before passing it to the LLM and processing the output before giving harmful response to the user

How It Works

  1. User interacts with the AI via a chat interface (Streamlit)
  2. Messages are sent to the memory engine (Mem0), which extracts and stores relevant memories
  3. Memories are retrieved and provided as context to the LLM (Groq/Llama-3) for personalized responses
  4. All conversations are stored in a vector database (Qdrant) for long-term recall

Memory Types

  • Short-term memory: Session-based, remembers the current conversation
  • Long-term memory: User-based, persists across sessions (using user_id)

Project Structure

memory_in_agents/
├── app.py                # Streamlit UI for chat
├── memory_agent.py       # Core logic: memory engine, LLM chain, chat function
├── MEMORY.md             # Theory and concepts of memory in AI agents
├── pyproject.toml        # Python dependencies
├── notebooks/
│   └── experiment.ipynb  # Example notebook for experiments
└── README.md             # This documentation

Core files involved are app.py and memory_agent.py for implementation purpose and experiement.ipynb for experiment


Setup & Installation

  1. Clone the repo

    git clone https://github.com/Jerry-britto/AI-Interview-Coach.git
    cd AI-Interview-Coach
  2. Create a virtual environment

    python3 -m venv .venv
    source .venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
    # or
    pip install -e .
  4. Set up API keys

    • Copy .env.example to .env and add your keys for GROQ_API_KEY and GEMINI_API_KEY.

Running the App

Streamlit Web UI

streamlit run app.py

Open http://localhost:8501 in your browser.

CLI Demo

python main.py

Main Files Explained

  • app.py: Streamlit web interface for chatting with the AI coach. Handles user input, session state, and displays stored memories.
  • memory_agent.py: Implements the memory engine using Mem0, integrates with Groq LLM and Gemini embedder, and provides the chat() function.
  • notebooks/experiment.ipynb: Jupyter notebook for experimenting with memory and retrieval.

How Mem0 Memory Engine Works

  1. Receives user messages and extracts memories using an LLM
  2. Resolves conflicts (e.g., updates preferences if changed)
  3. Stores memories in a vector DB (Qdrant)
  4. Retrieves relevant memories for each new query
  5. Combines graph and vector search results for best context

See MEMORY.md for a deep dive into memory concepts and parameters.

About

An AI interview coach conducting personlized interview based on the info it has about you

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages