Skip to content

yuvraajnarula/news-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

169 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News Agent

Day 1 (Apr 15)

  • Project Initialization: Finalized project discussion and system architecture approval.
  • Initial Setup: Established repository, technical requirements, and core folder structure.
  • Documentation: Created base README.md.

Day 2 (Apr 16)

  • Core Integration: Setup MCP Server/Client and integrated DuckDuckGo (DDG) and Tavily tool catalogs.
  • Refinement: Optimized prompts and restricted scope for better local model performance.
  • Infrastructure: Introduced a Rate Limiter (IP and Session-based) and a delegation script (run.py) for managing dual servers.
  • Workflow: Established the base API setup with node-based logic and tool-calling methods.

Day 3 (Apr 17)

  • Memory & Storage: Integrated ChromaDB for vector operations and established a News Memory Client.
  • Logic Gates: Added a planner_node with new conditional logic and refactored search nodes for better modularity.
  • Session Management: Built a robust Session Manager to handle input, synthesis, and session state within the API.
  • UX Enhancements: Resolved "double texting" bugs and initiated Phase 1 of UX Streams.
  • Health Checks: Established system metrics and health monitoring endpoints.

Day 4 (Apr 20)

  • Advanced Querying: Refactored search logic to utilize a k-NN (k-Nearest Neighbors) approach for more accurate querying.
  • Multimodal Expansion: Introduced a lightweight Base Voice Model to handle audio interactions.

Day 5 (Apr 21)

  • Validation Layer: Implemented a new Validator module and patched validation logic within the synthesis node.
  • Configuration: Centralized settings into a dedicated Config File with subsequent patching for stability.
  • Agent Intelligence: Integrated advanced Agent Tools and established a ReAct integration flow using Gemini for complex reasoning.
  • Caching & Sessions: Added Redis CLI integration and enhanced Session Manager with cache-backed workflows.
  • Infrastructure Updates: Introduced /query/sync cache handling and applied Redis patches.
  • Release: Tagged v1.0.1 milestone.
  • Maintenance: Merged development branch into main and performed final synthesis node patches.
  • Docker: Initialized docker scripts for future deployment and scalability.

Day 6 (Apr 22)

  • Model Enhancements: Updated Gemini integration with time-aware modifications and improved response validation (handling rate limits like 429 errors).

  • Clustering System:

    • Added Cluster Schema Endpoint.
    • Introduced Smart Clustering (initial version; performance improvements pending).
  • State Management:

    • Implemented Base Checkpointing System.
    • Added State Versioning for better traceability and rollback.
    • Improved Tracing in checkpoint and observation layers.
  • Caching Layer:

    • Introduced Semantic Cache Layer.
    • Implemented Semantic Caching Mechanisms for improved query efficiency.
  • Memory Intelligence:

    • Built Memory Router for dynamic routing.
    • Added Memory Update Loop.
    • Introduced Memory Intelligence Layer for adaptive learning.
    • Implemented Memory Consolidation for long-term coherence.

Day 7 (Apr 23 – Apr 28)

Debug + Trace System (Section 6)

  • Trace Viewer APIGET /trace/{session_id} endpoint showing:
    • Node execution flow
    • Latency per node
    • Cache hits/misses
    • Memory state (snapshot)
  • Replay Debugger – full pipeline replay from any checkpoint:
    • replay_engine.py with ability to re‑execute the graph from a saved state
    • Diff comparison between original and replayed runs
    • REST endpoints: /replay/{session_id}/rerun, /replay/diff/{session_id}
  • Checkpoint Middleware – automatically captures state at each node, stores in Redis, and creates trace events with memory snapshots.

Evaluation System (Section 4)

  • Regression Test Suiterun_regression.py script that:
    • Executes a golden dataset of queries
    • Measures relevance (word‑overlap Jaccard similarity, 0–10 scale)
    • Measures hallucination rate (presence of key facts in answer, 0.0 or 0.5)
    • Measures latency per query (ms)
  • Golden Datasetgolden_dataset.json storing queries, expected answers, key facts, and pass thresholds.
  • Baseline Comparison – saves results as baseline.json and latest.json, supports --compare to show quantitative changes:
    • Relevance change
    • Hallucination change
    • Latency change
    • Pass rate change
  • Heuristic Evaluator – pure Python (no external LLM) to avoid quota issues and ensure deterministic metrics.

Other improvements

  • Fixed AgentState attribute access across all nodes (replaced dict subscripting with getattr).
  • Added mock search for regression (avoids MCP dependency).
  • Improved synthesis node with factual answer extraction for simple queries.
  • Removed Gemini dependency from evaluator, relying on heuristics.

Day 8 (Apr 28 – Apr 29)

Frontend & API Expansion

  • Built initial Frontend Interface for interacting with the agent.
  • Added structured User Routes + API Routes for better separation of concerns.
  • Fixed critical issues in main.py and improved overall API stability.
  • Performed multiple frontend bug fixes and usability improvements.

LLM + MCP Improvements

  • Refined LLM response formatting and cleanup for more consistent outputs.
  • Reworked Search Node integration with MCP, improving reliability and modularity.
  • Fixed bugs in MCP interaction layer.

Event System Introduction

  • Designed and initialized Event Schema.
  • Implemented Event Logger inside API routes for better observability and debugging.

Data & Graph Layer (RedisGraph Phase)

  • Introduced RedisGraph CLI tooling.
  • Added graph-based experimentation layer for relationships and structured querying.

Embeddings Pipeline

  • Built Embedding + Builder pipeline for semantic processing and indexing.

Dev Workflow

  • Merged dev=>frontend and stabilized integration across branches.

Day 9 (Apr 30)

Answerable Node (Major Feature)

  • Introduced Answerable Node to determine if a query can be directly answered.
  • Integrated node into execution graph with proper routing logic.
  • Added streaming support for Answerable Node responses.
  • Updated routes.py to support real-time streaming outputs.

Graph Patching & Stability

  • Patched node graph to properly include Answerable Node in flow.
  • Improved orchestration between planner=>answerable=>synthesis.

Infrastructure Progress

  • Began migration toward Redis Stack (partially completed).
  • Applied multiple fixes to stabilize transition.

Day 10 (May 5)

Graph Layer Migration (Major Refactor)

  • Migrated from RedisGraph=>Neo4j for improved stability and scalability.
  • Updated Docker configuration to support Neo4j setup.
  • Refactored graph-related logic to align with new backend.

Core Runtime Refactor

  • Refactored run.py (multi-part update):
    • Improved server orchestration
    • Cleaner execution flow
    • Better maintainability for dual-service architecture

System Direction

  • Shift from experimental graph layer=>production-ready graph architecture (Neo4j).
  • Continued focus on stability, streaming, and modular execution graph.
  • Load Balancer & Containerisation: Added Nginx reverse proxy, scaled API with Docker Compose, and containerised the graph builder service.

Day 11 (May 6)

Router & Classification System

  • Built Router Dataset Generator for automated dataset creation and routing experiments.
  • Introduced initial Routing Model pipeline for query classification and execution control.
  • Added Decomposer + Classifier Nodes into the execution graph for better intent decomposition and routing.
  • Established early-stage query decomposition workflows for multi-intent handling.

Day 12 (May 7)

Model Training + Validation

  • Built complete training + validation pipeline for routing and decomposition models.
  • Added automated data generation workflows for training samples and evaluation datasets.
  • Refactored Classifier Node into the input layer with fallback routing logic for improved efficiency.
  • Refined Decomposer Node using lexical-rule based decomposition strategies.
  • Integrated decomposer routing directly into the execution graph.

Day 13 (May 12)

Observability & Tracing

  • Added Langfuse integration for runtime tracing, analytics, and observability.
  • Added LangSmith integration for experiment tracking and execution monitoring.
  • Improved debugging and trace visibility across graph execution workflows.

Updated System Highlights

  • Intelligent Router + Decomposer architecture now handles query classification and multi-intent decomposition.
  • Custom-trained routing models support adaptive execution flow selection.
  • Integrated observability stack with Langfuse + LangSmith for tracing and evaluation.
  • Training, validation, and dataset generation pipelines established for continual model improvement.
  • System architecture continues evolving toward a scalable, production-ready agent platform.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors