Back to selected work

AI & Automation / Natural Language Processing / Multi-Agent Systems

SimpleAgent.

The Daily Dish — Rule-Based Multi-Agent Assistant

A rule-based multi-agent assistant combining natural-language routing, document retrieval, weather API integration, and session memory in an interactive Streamlit application.

Rule-based assistant · Local learning project

01. Overview

One conversation, specialized sources

A rule-based multi-agent assistant combining natural-language routing, document retrieval, weather API integration, and session memory in an interactive Streamlit application.

Rule-based assistant · Local learning project

02. The problem

The problem

How can understandable Python rules route natural-language questions to specialized weather and restaurant components, retrieve relevant information, and retain useful context for follow-up questions?

03. The approach

The approach

  1. 01

    Normalize queries and apply rule-based routing to specialized weather and restaurant agents, with clarification for unsupported or ambiguous questions.

  2. 02

    Retrieve current weather through OpenWeather using Requests, with HTTPS, timeouts, API error handling, and city selection from questions.

  3. 03

    Extract restaurant FAQ question-and-answer pairs from PDF text with PyMuPDF, then rank matches using Scikit-learn TF-IDF vectorization and cosine similarity.

  4. 04

    Keep limited session-based conversational memory for context-aware follow-up questions, including the last successful weather city.

  5. 05

    Present conversations, suggested questions, weather metrics, and optional retrieval explanations in Streamlit; test routing, retrieval, memory, API behavior, and interface interactions with Pytest.

04. Technical architecture

Technical architecture

  1. Streamlit conversation interface
  2. Query normalization
  3. Rule-based router
  4. Weather agent / OpenWeather API
  5. Restaurant agent / PDF FAQ / TF-IDF + cosine similarity
  6. Temporary session memory

05. Outcomes & reflection

Results and limitations

The repository documents 72 passing local tests covering weather responses and failures, PDF parsing, retrieval, routing, memory, and Streamlit interactions. All 13 code cells in the enhanced notebook executed successfully. The retrieval evaluation uses a small synthetic dataset, not a validated real-restaurant benchmark.

Scope & limitations

A learning project extended from an IBM lab. It uses Python rules and document retrieval, not ChatGPT, Gemini, other LLMs, LangChain, CrewAI, or autonomous generative agents. TF-IDF can miss unfamiliar wording; cosine similarity is word overlap, not a correctness probability. Memory is temporary within the active session. Weather requires an API key, and FAQ retrieval requires an authorized text-based PDF. It cannot make reservations or check table availability. There is no verified public deployment URL; real API, actual-document retrieval, and desktop/mobile validation remain further work in the repository.

Keep exploring

TECHFEST 2025 — Regional Fiscal Analytics