Back to Projects
Internal

Agent Learning Service

ML-powered adaptive knowledge assessment engine

PythonFastAPIscikit-learnLLaMAChromaDB

Overview

The Agent Learning Service is a Python microservice that powers the knowledge testing feature in RankdResume. It extracts skills from a user's resume, generates domain-specific questions using LLaMA, evaluates answers, and adapts difficulty based on performance. A ChromaDB vector store enables semantic search over the training knowledge base.

Key Features

Skill extraction from parsed resume data
LLaMA-powered question generation per skill domain
Adaptive difficulty - harder questions as user improves
Semantic retrieval via ChromaDB (RAG-style knowledge tests)
Custom scikit-learn model for answer evaluation
Synthetic training data generation for model warm-up
REST API consumed by NestJS backend
Model versioning and retraining pipeline

How It Works

1

Skill Extraction

Service receives the parsed resume JSON. It extracts skills, experience years, and domain keywords to build a learning profile.

2

Question Generation

LLaMA generates questions for each skill. ChromaDB retrieves relevant domain knowledge chunks to ground the questions factually (RAG).

3

Quiz Delivery

15 questions are sent to the NestJS backend which relays them to the frontend. User answers are collected and sent back.

4

Answer Evaluation

The ML model evaluates answers using semantic similarity. Score and per-question feedback are returned.

5

Certificate

If score ≥ threshold, backend triggers certificate generation and Resend email notification.

Tech Stack

Runtime

  • Python 3.11
  • FastAPI

ML

  • scikit-learn
  • LLaMA 3 (via Ollama)
  • SentenceTransformers

Vector DB

  • ChromaDB
  • HuggingFace Embeddings

Data

  • Synthetic data generator
  • JSON training sets

Architecture

A retrieval-augmented generation (RAG) pipeline combining LLaMA for generation, ChromaDB for knowledge retrieval, and scikit-learn for answer scoring.

Consumer
NestJS Backend
Orchestrator
Agent Service
FastAPI Server
API & routing
Skill Collector
Profile extraction
Inference Engine
Q-generation & scoring
AI & Knowledge
LLaMA 3 (Ollama)
Question generation
ChromaDB
Vector knowledge base
scikit-learn
Answer evaluation model
Training Pipeline
Synthetic Data Gen
Training data factory
Model Trainer
Offline retraining

Data Flow

  1. 1Resume JSON arrives → Skill Collector extracts skill list and domain context.
  2. 2For each skill: Inference Engine queries ChromaDB for relevant knowledge chunks (RAG retrieval).
  3. 3LLaMA generates 3 candidate questions per chunk → best 15 selected by diversity scoring.
  4. 4User answers returned → scikit-learn model evaluates semantic similarity between answer and expected.
  5. 5Offline: Synthetic Data Generator builds training sets → Trainer retrains model → new weights hot-loaded.

Interested in building something similar?

Get in Touch