AI Jobs Data Agent (LangChain + Streamlit)

Scope note: learning project, not a production system. Built to practice tool-calling LLM agents and semantic search with ChromaDB.

github

Goal

Build a chat interface that lets you explore a dataset of 5,700+ AI job postings by asking questions in plain English. The agent decides whether to compute a statistic, render a chart, or plot cities on a map.

Approach

  1. Geocode 1,179 unique cities via Nominatim (OpenStreetMap) with a local JSON cache — 99.4% coverage.
  2. Embed job descriptions with all-MiniLM-L6-v2 and index them in ChromaDB with geo-metadata for semantic search.
  3. Wire a LangChain tool-calling agent (Llama 3.3 70B on Groq) to two deterministic Python tools: one for stat calculations, one for Plotly chart generation.
  4. Serve the whole thing in a Streamlit app with a 15-query rate limiter for public deployment.

Guiding questions

  • Can a tool-calling agent reliably route natural-language queries to the right tool without hallucinating statistics?
  • Is semantic search over job descriptions useful alongside structured analytics?
  • How well does batch geocoding scale to ~1,200 cities with rate-limited APIs?

Data

  • 5,773 AI/ML job postings from global sources with salary ranges, experience levels, required skills, and city-level coordinates.
  • Pipeline code and Streamlit app live in the project repository.

Headline numbers

Job postings5,773across 40+ countries
Unique cities1,159geocoded
Geocoding rate99.4%via Nominatim
LLMLlama 3.370B via Groq
EmbeddingsMiniLMall-MiniLM-L6-v2
Chart types3histogram, box, map

Pipeline

1
Data Collectionai_jobs_global.csv

5,700+ AI job postings scraped from global sources with salary, location, and skill metadata.

2
Geocodingadd_coor.py

Batch geocoding of 1,179 unique cities via Nominatim (OpenStreetMap) with local JSON cache for resilience.

3
Vector Storemodel.py

Job descriptions embedded with all-MiniLM-L6-v2 and indexed in ChromaDB with geo-metadata for semantic search.

4
Agentapp.py

LangChain tool-calling agent (Llama 3.3 70B via Groq) routes queries to stat calculations or Plotly chart generation.

Agent tools

calculate_job_statComputes mean, max, min, or count for any column, optionally filtered by location.
plot_job_dataGenerates histogram, box plot, or scatter-geo map with location filtering and grouping.

Live demo

Try asking questions like “Show me a map of AI jobs in the USA”, “Compare salaries between Germany and the UK”, or “What is the average salary for AI engineers?”

Conclusion

  • The tool-calling pattern keeps the LLM focused on routing and narration while deterministic Python functions handle the actual data work — no hallucinated statistics.
  • Geocoding 1,179 cities at 99.4% coverage makes scatter-geo maps practical for any country or region filter.
  • The 15-query rate limiter keeps API costs bounded for public deployment.
PythonStreamlitLangChainGroqPlotlyChromaDBNLPRAG