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.
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
- Geocode 1,179 unique cities via Nominatim (OpenStreetMap) with a local JSON cache — 99.4% coverage.
- Embed job descriptions with all-MiniLM-L6-v2 and index them in ChromaDB with geo-metadata for semantic search.
- 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.
- 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
Pipeline
ai_jobs_global.csv5,700+ AI job postings scraped from global sources with salary, location, and skill metadata.
add_coor.pyBatch geocoding of 1,179 unique cities via Nominatim (OpenStreetMap) with local JSON cache for resilience.
model.pyJob descriptions embedded with all-MiniLM-L6-v2 and indexed in ChromaDB with geo-metadata for semantic search.
app.pyLangChain 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.