Skip to content

BLEND360/Hackathon_PIH

Repository files navigation

PIH — Project Intelligence Hub

The Knowledge Flywheel · Team Nexus · Blend360 Internal Hackathon

Ask a question about Blend's past projects and get a sourced answer. When the answer isn't in our materials, PIH doesn't shrug — it flags the gap, tells you who to ask, drafts the outreach message, and when the answer comes back it captures and remembers it. The system gets smarter every time it's used.


Quick start

pip install -r requirements.txt

Set the Anthropic key provided at kickoff (either export it or drop it in a .env file — see .env.example):

export ANTHROPIC_API_KEY=sk-ant-...   # PowerShell: $env:ANTHROPIC_API_KEY="sk-ant-..."

Drop the kickoff materials into project_files/, then ingest and launch:

python ingest.py            # parse + embed everything in project_files/
streamlit run app.py        # open the UI

Sample data for two fake projects (NCL, Meridian Retail) ships in project_files/ so you can demo before real data lands.


The three-layer architecture

  1. Knowledge Base (ingest.py, retrieval.py) — RAG over project files via ChromaDB. Grounded answers with visible sources.
  2. Gap Engine (gap_engine.py) — when materials fall short, identifies the missing field, surfaces the right human, and drafts an outreach message.
  3. Memory Loop (capture.py, SQLite in pih_memory.db) — captured answers persist as structured knowledge units. Retrieval checks them first, so the next session just knows — and cites who told us.

Plus the One-Pager Generator (onepager.py): a shareable project summary where every section is tagged [DOCUMENTED] / [CAPTURED] / [GAP — contact X].

Layout

File Role
config.py Central config (paths, model id, thresholds)
llm.py Anthropic API wrapper
db.py SQLite capture store + project metadata
ingest.py Parse → chunk → embed into ChromaDB
retrieval.py Vector search + gap-aware grounded answering
gap_engine.py Gap detection + who-to-ask + outreach draft
capture.py Distill a human reply → structured knowledge unit
onepager.py Confidence-tagged project one-pager
app.py Streamlit UI (Ask · Gaps & Capture · One-Pager · Admin)
test_runner.py Run the test set → test_results.csv

Production path & data ownership

A common question: the hackathon Claude key is temporary — what happens when it goes away? PIH is built so this is a non-issue.

  • The key is a swappable credential, not part of the product. It lives in .env and is read through one constant (config.ANTHROPIC_MODEL + the env var). Moving to production is a config change, not a rebuild:
    • Blend's own Anthropic account, or
    • Amazon Bedrock on Blend's AWS (the enterprise deployment path), with proper budget and governance.
  • The value doesn't live in the key. The differentiator — captured knowledge units in SQLite (pih_memory.db) and embedded materials in ChromaDB — is Blend's owned asset and persists locally regardless of which LLM credential is active. If the key vanished: the knowledge base and every captured answer remain, retrieval still cites the right sources; only answer phrasing and gap/outreach drafting pause until a new key is plugged in.

Framing: PIH is not "an app that needs a Claude key." It's Blend's institutional memory that uses an LLM to read and write it. The LLM is a rented engine; the knowledge is the owned asset. Any capable model behind any valid key drives it.

Submission checklist

  • Demo video (the 6-scene story)
  • test_results.csv (python test_runner.py)
  • One generated one-pager
  • Gap → capture → persist loop shown, including the fresh-session proof

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages