Inspiration
I was working within a consulting firm this summer, and a key issue I noticed was not a lack of case knowledge, but a lack of a way to make it findable. The engagement that actually solves a new problem is often filed under a different industry entirely, so keyword and industry-filtered search misses it by construction. For example, the best precedent for a retail supply-chain problem might be sitting in a manufacturing case study nobody thinks to check. In addition, even when someone finds a useful case, that insight usually disappears once the search is over.
What it does
I created Case Match to address the issues detailed above. It features three views:
“Find a Precedent” takes a new client situation, embeds it, and searches the firm’s case library for similar work, even when the match comes from a different industry or problem category. It uses distributed vector search to surface the strongest precedents and, when the initial results are weak, broadens its own search strategy before selecting a match and generating pitch language a consultant can use.
“Add a Case” turns past engagements into structured, searchable knowledge. A consultant can upload a case-study PDF or enter the details manually, while Bedrock proposes the structured fields for review.
“Case Library” then makes those cases searchable across the firm.
All three views read from and write to the same CockroachDB memory layer. That means every new case strengthens the system: the knowledge base doesn’t reset after a search, it compounds with every engagement.
How we built it
At the core of Case Match is a LangGraph agent that follows a deliberate search loop: embed → recall → retrieve → evaluate → broaden if weak → select → remember. A FastAPI backend orchestrates the workflow, while CockroachDB serves as the system’s shared memory layer. It stores two VECTOR(1024) indexes, one for the case corpus and one for the agent’s past queries, alongside transactional feedback data, keeping search, ranking, and evidence in the same source of truth.
Amazon Bedrock handles the intelligence layer: Titan V2 generates embeddings, while Nova evaluates candidate precedents, drafts pitch language, and extracts information from uploaded PDFs.
During development, I used CockroachDB’s Cloud Managed MCP Server directly from Claude Code to design the schema and watch the agent’s memory accumulate in real time.
The UI is built entirely with HTML, using a simple, spreadsheet-inspired design with real gridlines and worksheet-style tabs to keep the experience familiar and practical for consultants.
The application is deployed on Vercel with a dedicated IAM user that I configured scoped only to the two Bedrock models the system needs.
Challenges we ran into
A big challenge was tuning the ranking so a genuinely similar cross-industry case could beat a weaker same-industry case, without letting industry or feedback signals overpower relevance. I also had to find the right memory threshold so differently worded versions of past questions were recognized without over-matching.
Accomplishments that we're proud of
I'm proud that the agentic memory component of this product is actually functional and that I was able to use it to solve a problem that I saw in industry.
What we learned
- Agentic memory: how storing and retrieving an agent’s past queries can give an AI system persistent memory.
- Vector search & embeddings: how semantic similarity can find relevant cases even when the wording or industry is different.
- Search/ranking design: how combining semantic similarity with signals like industry and feedback affects retrieval quality.
- RAG / retrieval pipelines: how to retrieve information first and then have an LLM reason over the retrieved context.
- Production deployment and security: working with Vercel, AWS Bedrock, IAM permissions, and least-privilege access.
What's next for Case Match
- Authentication and rate limiting so only authorized consultants can add cases or feedback.
- Multi-tenant support so different firms can have private case libraries on the same infrastructure.
- Richer feedback that captures why a precedent was or wasn’t useful and uses that to improve future ranking.
- More flexible intake beyond PDFs, so consultants can capture case knowledge as they work instead of after the fact.
Built With
- cockroach-db
- docker
- fastapi
- html
- langgraph
- mcl
- postgresql
- python
- rag
- vercel