Skip to content
View aiXpertLab's full-sized avatar
💘
AI
💘
AI

Block or report aiXpertLab

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
aiXpertLab/README.md

🧠 Haystacked

Agentic AI applications built with LangChain & Haystack — grounded, explainable, and production-ready.

Haystacked — Agentic AI Systems



Python LangChain Haystack SQL Vector Search License


LinkedIn Twitter


🚀 Mission

Haystacked exists to build real AI agents — not demos.

We design agentic AI applications that connect LLMs to real systems: databases, vector stores, and external tools — with correctness, transparency, and production constraints as first-class concerns.

LLMs are powerful.
Agents are responsible.


🧠 What Haystacked Builds

  • 🤖 Agentic AI systems using LangChain and Haystack
  • 🧰 Tool-orchestrated workflows (SQL, retrieval, web search, APIs)
  • 📊 Data-grounded reasoning over structured and unstructured sources
  • 🔐 Production-safe execution with guardrails and observability
  • Explainable answers backed by traceable evidence

This is not prompt engineering.
This is systems engineering with LLMs.


🏗️ Agent Architecture

flowchart LR
    Q[User Query] --> A[Agent]
    A -->|Plan| R[Tool Router]

    R -->|SQL| DB1[Deal Table]
    R -->|SQL| DB2[Canada Wages DB]
    R -->|Vector| VS[Vector Store]
    R -->|Web| WEB[External Search]

    DB1 --> A
    DB2 --> A
    VS --> A
    WEB --> A

    A --> L[LLM Reasoning]
    L --> O[Grounded & Explainable Answer]
Loading

🧩 Core System Components

🔹 SQL Tooling

  • Schema-aware query generation
  • Read-only execution
  • Parameterized queries
  • Row limits and timeouts

🔹 Vector Retrieval

  • Semantic similarity search
  • Context injection for reasoning
  • Historical and domain grounding

🔹 External Search

  • Real-time data enrichment
  • Clearly labeled non-authoritative sources
  • Never overrides internal data

🔐 Safety & Guardrails

Every agent execution is constrained by design:

  • ❌ No data mutation (INSERT, UPDATE, DELETE, DROP)
  • SELECT-only SQL queries
  • ⏱ Execution time limits
  • 📉 Result size caps
  • 🔍 Pre-execution validation
def validate_sql(query: str) -> None:
    assert query.strip().lower().startswith("select")
    forbidden = ["insert", "update", "delete", "drop", "alter"]
    for keyword in forbidden:
        if keyword in query.lower():
            raise ValueError("Forbidden SQL operation")

🧠 Explainability by Default

Every response produced by Haystacked includes:

  • Answer — the conclusion
  • Sources — where the data came from
  • Reasoning — how the conclusion was derived

Example:

Answer:
Average wage growth for Ontario tech roles is 4.2%.

Sources:
- Canada Wages Database (2023–2024)
- Vector context: regional labor trends

Reasoning:
Filtered by province and industry, then compared year-over-year averages.

📌 Example Agent Queries

  • “What’s the average wage growth for tech roles in Ontario?”
  • “Compare fintech deal sizes between Q2 and Q3”
  • “Are deal trends aligned with labor market signals?”
  • “Summarize financial risks using current wage data”

🛠️ Technology Stack

  • Python 3.13
  • LangChain — agent orchestration
  • Haystack — retrieval & document pipelines
  • SQL (Postgres / MySQL) — authoritative data access
  • Vector Stores (pgvector / Chroma) — semantic retrieval
  • LLMs (GPT-5 class) — reasoning & synthesis

🧪 Built for Production

  • Deterministic tool execution
  • Modular, extensible agent design
  • Framework-agnostic architecture
  • Observability-ready reasoning traces

🔮 Roadmap

  • Multi-agent collaboration
  • Cost-aware routing
  • Caching & replay
  • Human-in-the-loop review
  • Visualization of reasoning traces

Haystacked — AI agents that reason over reality.

Pinned Loading

  1. a6.CasePool2 a6.CasePool2 Public

    Java

  2. my-toolbox my-toolbox Public

    Python

  3. facenet-keras-2024 facenet-keras-2024 Public

    Forked from davidsandberg/facenet

    Face recognition using FaceNet in Tensorflow2/Keras3/Python3.12.

    Python 3

  4. Machine-Learning-Neural-network-Deep-Learning Machine-Learning-Neural-network-Deep-Learning Public template

    Jupyter Notebook 2

  5. face-recognition-ycc face-recognition-ycc Public

    Face Recognition Pipline

    Python 1

  6. Pytorch Pytorch Public

    Forked from LearnPythonWithJupyter/Notebooks

    Pytorch

    Python 1