Skip to content

jery04/LLM-Pathway-Evaluator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LLM Pathway Evaluator πŸš€

Program running preview

Custom Learning Path Generation for Online Course Catalogs

This system solves a constrained planning and optimization problem in the professional learning domain. Given a set of candidate decisionsβ€”courses, skills, certificationsβ€”it generates multiple valid learning pathways and evaluates them across technical metrics such as cost, duration, difficulty, and semantic alignment. The architecture uses a Large Language Model (LLM) as an analysis engine to compare, rank, and explain alternative progression strategies.

Overview πŸ”

The project converts normalized online course catalogs into structured learning trajectories. Using normalized course metadata and NLP embeddings, the system:

  • πŸ“₯ Extracts and normalizes online course information.
  • 🧠 Computes semantic embeddings and similarity scores.
  • πŸ›€οΈ Builds learning pathways that connect skills, objectives, and prerequisites.
  • 🌐 Presents results through a lightweight Streamlit web UI.

The goal is to help learners, professionals, and teams identify the most appropriate sequence of courses based on goals and prior experience.

Project Structure πŸ—‚οΈ

LLM Pathway Evaluator/
β”œβ”€β”€ README.md                   # Project documentation
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ .env                        # Environment variables for API keys and config
β”œβ”€β”€ Alternative Career Paths Report.pdf  # Project PDF report
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ embedding.json          # Cached course embeddings
β”‚   β”œβ”€β”€ normalized_courses.json # Normalized course metadata
β”‚   └── csv/                    # Raw dataset CSV files
β”‚       β”œβ”€β”€ dataset_1.csv
β”‚       β”œβ”€β”€ dataset_2.csv
β”‚       └── ...
β”œβ”€β”€ previews/                   # UI preview images shown in README
β”œβ”€β”€ experiments/                # Experimental test cases and quality tests
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app.py                  # Streamlit UI for pathway exploration
β”‚   β”œβ”€β”€ download_dataset.py     # Kaggle dataset download and normalization
β”‚   β”œβ”€β”€ llm_adapter.py          # LLM / spaCy adapter for embeddings and explanations
β”‚   β”œβ”€β”€ planner.py              # Path planning and course modeling logic
β”‚   β”œβ”€β”€ simulation.py           # Simulation runner for pathway evaluation
β”‚   └── strips_search.py        # STRIPS based search for course path planning
β”œβ”€β”€ tests/                      # Unit tests for core logic
└── .gitignore

Installation πŸ› οΈ

Prerequisites πŸ“Œ

  • Python 3.8+
  • pip
  • Internet access for dependency installation and spaCy model downloads

1. Clone the repository πŸ“‚

git clone https://github.com/jery04/LLM-Pathway-Evaluator.git
cd "LLM Pathway Evaluator"

2. Create and activate a virtual environment 🧰

python -m venv .venv
.\.venv\Scripts\Activate.ps1

If you use cmd:

.\.venv\Scripts\activate.bat

If you use Git Bash or WSL:

source .venv/bin/activate

3. Update pip and Install dependencies πŸ“¦

python -m pip install --upgrade pip
pip install -r requirements.txt

4. Prepare dataset files πŸ“

Verify the presence of the following data artifacts:

  • data/normalized_courses.json
  • data/embedding.json
  • data/csv/*.csv

If the files are missing, regenerate them with:

python src/download_dataset.py

5. Create a .env file and obtain an API key πŸ”‘

Before launching the web UI, create a .env file in the project root containing your Gemini API key:

GEMINI_API_KEY=YOUR_API_KEY_HERE

How to create the .env file from the terminal:

  • PowerShell (Windows):
echo "GEMINI_API_KEY=YOUR_API_KEY_HERE" > .env

Step-by-step: how to obtain a Gemini API key (Google Generative AI):

  1. 🌐 Open https://console.cloud.google.com/ and sign in with your Google account.
  2. πŸ“ Create a new project or select an existing project using the project selector (top-left).
  3. βš™οΈ Go to "APIs & Services" β†’ "Library" and search for "Generative AI" or "Generative AI API"; click "Enable" if it is not already enabled.
  4. πŸ”‘ Go to "APIs & Services" β†’ "Credentials" β†’ "Create credentials" β†’ "API key".
  5. πŸ“‹ Copy the newly created API key and paste it into the .env file as GEMINI_API_KEY=YOUR_API_KEY_HERE.
  6. πŸ›‘οΈ (Optional but recommended) In the Credentials section, restrict the API key by IP address, HTTP referrer, or API usage to improve security.

Note: If you use Generative AI Studio (https://console.generativeai.google), the interface and flow may differ slightly; look for "Credentials" or "API keys" in that interface.

6. Run Tests πŸ“‹

To verify that all dependencies and setup steps are correct, run the project test harness with the following command:

python tests/tests_runner.py

Note: if any test fails, review the previous installation and setup steps before proceeding.

7. Launch the web UI (inside the created environment) πŸš€

After creating the .env file with your API key, run the following command (inside the activated virtual environment):

streamlit run src/app.py

Experiment πŸ§ͺ

In the experiments/ folder, a specific forced-condition test case was created to evaluate the response quality of the system. It contains a deliberately crafted set of courses designed to stress-test the recommendation engine across all three supported optimization criteria:

  • Fastest Path – minimizes time to completion
  • Cheapest Path – minimizes total cost
  • Balanced Path – optimizes for both time and cost

The test dataset was intentionally constructed (not sampled from real data) to expose edge cases and verify that each routing strategy produces semantically correct and distinguishable recommendations.

Running the Quality Test

To execute the experiment, run the following command from the project root:

python -m experiments.quality_test

This will run the full quality evaluation suite against all three path criteria and output the results for manual or automated inspection.

Key Dependencies πŸ“˜

Core Libraries

  • streamlit: interactive web UI for career path generation and visualization
  • google-genai: Google Gemini client for LLM-powered explanations
  • spacy: NLP processing and skill extraction
  • langdetect: automatic language detection
  • kagglehub / kagglesdk: Kaggle dataset integration
  • numpy / scipy: numerical computation and similarity calculations
  • python-dotenv: environment variable management

NLP Models

  • en-core-web-md: English spaCy model
  • es-core-news-md: Spanish spaCy model

Example Output 🎯

A typical generated pathway might look like this:

Program running preview Program running preview

Program running preview Program running preview

The following images correspond to the simulation section:

Simulation 1 Simulation 2

Simulation 3 Simulation 4


Built with ❀️ by a human

About

πŸ—ΊοΈ Career trajectory exploration system β€” Framework that builds and assesses valid career paths through optimization, planning, and constraint satisfaction, integrating an LLM to analyze and qualitatively compare generated trajectories.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages