AWS Builder Center
The Knowledge Heist: Building ContextForge on AWS

The Knowledge Heist: Building ContextForge on AWS

What if the most valuable knowledge in your team disappeared every time a meeting ended or a browser tab closed? We built ContextForge to capture, secure, structure, and retrieve that knowledge using AI, multi-index search, and an AWS-ready architecture.

I am software developer

The Problem: Every Team Has a “Missing Context” Bug

If you've spent enough time building software, you've probably seen this:
Developer: Why is this API using this weird configuration?

Developer 2: I think someone explained it in a meeting.

Developer: Which meeting?

Developer 2: Umm... six months ago.
And then begins the archaeological expedition through:
  • Slack messages
  • WhatsApp chats
  • GitHub issues
  • Google Docs
  • Meeting recordings
  • Browser tabs
  • Configuration files
  • Random Markdown files
  • And, eventually, asking the one person who might remember
The information exists.
The problem is retrieval.
We realized that this looked surprisingly similar to something every developer already understands:
Your system has the data. Your problem is finding the right data at the right time.
That became the foundation of ContextForge.



Think Like a Java Developer

One of the themes that inspired our thinking was the way we approach software engineering fundamentals.
If you've learned Java seriously, you've probably heard the classic idea:
“Write once, run anywhere.”
We wanted to bring a similar philosophy to organizational knowledge:
Capture once. Structure it properly. Retrieve it anywhere.
Instead of creating another chatbot that simply throws documents into an LLM, we asked a more fundamental question:

What if knowledge itself had a data model?

A fact shouldn't just be:
"Payments service runs on port 8080."
It should know:
Fact:
Payments service runs on port 8080.

Source:
Deployment documentation

Project:
Payments

Access:
Backend + Platform

Type:
Configuration

Version:
Current
Now we're no longer just storing text.
We're building a knowledge system.



Your Company Has a Knowledge Base. It Just Doesn't Know It Yet.

Every organization already has a massive knowledge graph.
It's just hiding in plain sight.
A senior engineer knows why a database decision was made.
A DevOps engineer knows the deployment sequence.
A product manager knows why a feature was rejected.
A developer knows that a particular error has a very specific fix.
The information is distributed across people and tools.
ContextForge turns that scattered information into something machines can actually reason over.
The goal:
Turn tribal knowledge into searchable, structured, permission-aware engineering knowledge.



The Architecture: Capture → Structure → Retrieve

ContextForge follows a simple pipeline:
CAPTURE
↓
Normalize Data
↓
Extract Facts
↓
┌───────┼────────┐
↓ ↓ ↓
Keyword Vector Graph
│ │ │
└───────┼────────┘
↓
Access Filter
↓
Query Router
↓
AI Answer
↓
Source Citations
The interesting part isn't simply asking an LLM a question.
The interesting part is deciding:
Which knowledge should the LLM be allowed to see in the first place?



1. Capture: Don't Let Knowledge Escape

ContextForge can ingest knowledge from multiple sources:
  • Pasted text
  • URLs and web pages
  • Markdown and text files
  • Browser pages
  • AI chats
  • Chrome extension captures
  • Google Docs
  • Visible Google Meet captions
  • Screen screenshots through vision OCR
  • Watched local folders
The objective isn't to create a giant text dump.
We break information into atomic facts.
For example:
The payments service runs on port 8080.

Only the payments team can deploy it.

Production deployments require platform approval.
becomes three separate pieces of knowledge.
Each one can have its own:
  • Source
  • Project
  • Access tags
  • Type
  • Embedding
  • Relationships
  • Version
That's important because later, a user might ask three completely different questions about the same information.



2. Store: One Fact, Multiple Ways to Find It

Here's where things get interesting.
Not every question should be answered using semantic similarity.
Suppose someone asks:
What is DATABASE_PORT?
That's a very different problem from:
How do we deploy the payments service?
And that's different again from:
Why was MongoDB rejected for billing?
So ContextForge uses multiple indexes.

Keyword Index

For exact technical terms:
ERR_SOCKET_TIMEOUT
DATABASE_PORT
/tmp/app.sock

Vector Index

For semantic questions:
How does the payment service get deployed?

Graph Index

For relationships:
Service → Owner → Deployment → Approval → Database

Structured Data

For:
  • Configuration
  • Rules
  • Owners
  • Versions
  • Access policies
  • Actions
This is one of the core ideas behind ContextForge:
Don't force every problem into vector search.
Sometimes the smartest retrieval strategy is simply:
if key == "DATABASE_PORT":
return exact_value
Sometimes it's:
find semantically similar knowledge
And sometimes:
follow the relationship graph



3. Retrieve: Ask the Right Question in the Right Way

ContextForge supports eight retrieval modes.

1. RAG - The Investigator

For open-ended questions.
How is the payments service deployed?
The system combines:
  • Keyword search
  • Vector similarity
  • Graph relationships
and generates an answer using the retrieved context.



2. Graph - The DSA Fan

Some questions aren't really search problems.
They're relationship problems.
For example:
What steps are required before deploying payments?
The system can represent:
Build Image
↓
Get Approval
↓
Run Migration
↓
Restart Service
↓
Health Check
It's essentially treating the knowledge base like a graph.
And just like graph traversal in DSA, the relationships matter as much as the individual nodes.



3. Ruleset - The Decision Maker

Consider:
What happens if refund_amount > 500?
That's not simply a similarity search.
It's a rule:
IF refund_amount > 500
THEN
require_manager_approval
ContextForge extracts the condition and returns the applicable outcome.



4. Key-Value - The Configuration Lookup

For questions like:
What is REDIS_HOST?
or:
What is DATABASE_PORT?
We don't need an LLM to philosophize about it.
We need the value.
DATABASE_PORT → 5432
Simple.
Fast.
Deterministic.



5. Denylist - The “We Tried That Already” System

One of the most underrated types of organizational knowledge is:
Things we deliberately decided NOT to do.
For example:
Do not use MongoDB for billing transactions.
Six months later, another engineer proposes MongoDB.
Instead of repeating the same architecture discussion:
⚠ Previous decision found.

MongoDB was previously rejected for billing
because of the required transaction guarantees.

Source: Architecture Review — v2
This is where ContextForge becomes more than a document search engine.
It can preserve engineering decisions.



6. Versioned - The Git-Like Memory

Knowledge changes.
Today's API version may not be tomorrow's API version.
Today's configuration may become obsolete.
So ContextForge tracks versions.
Conceptually:
v1 → v2 → v3 → CURRENT
The default answer can use the current value while historical versions remain available when explicitly requested.
Think of it as Git for organizational knowledge.



7. Allowlist - The Access Boundary

Now comes the important part.
Not everyone should see everything.
A frontend developer might have:
frontend
public-api
ui
while a platform engineer might have:
platform
infrastructure
database
deployment
ContextForge uses project and role information to determine what knowledge a user can access.



8. Keyword - The Debugger's Best Friend

Developers don't always search semantically.
Sometimes we search:
ERR_NGINX_502_BAD_GATEWAY
or:
NullPointerException
or:
DATABASE_CONNECTION_TIMEOUT
For these cases, exact matching can be more useful than semantic similarity.
So ContextForge keeps a dedicated keyword retrieval path.



The Most Important Design Decision

Here's where we stopped thinking of ContextForge as:
“Another RAG application.”
Imagine a restricted fact:
Production database credentials
If we retrieve it first and filter it only after generating the response, we've already made a mistake.
The model has seen the information.
It may influence the answer even if the final output doesn't explicitly expose it.
So our architecture follows a simple principle:
Authorization before intelligence.
The flow becomes:
User Query
↓
Identity
↓
Project Access
↓
Fact Visibility
↓
Retrieval
↓
Graph / Vector / Keyword Search
↓
LLM
↓
Answer + Citations
Restricted knowledge should not participate in retrieval in the first place.
That principle applies to:
  • Vector search
  • Graph traversal
  • Citations
  • Context packs
  • Generated answers
  • Exports



AWS: More Than Just “Deploy It on the Cloud”

We initially thought about AWS as a collection of services.
Then the architecture forced us to think differently.
Instead of asking:
“Which AWS service can we use?”
we started asking:
“What responsibility should this component own?”
That led us toward:

Application

  • FastAPI
  • Mangum
  • API Gateway
  • AWS Lambda

AI

  • Amazon Bedrock
  • Amazon Titan Embeddings

Storage

  • DynamoDB
  • S3 where required
  • Vector metadata
  • Graph relationships

Operations

  • CloudWatch

Frontend

  • S3
  • CloudFront where required
The important part wasn't the number of AWS services.
It was the separation of responsibilities.



Java-Inspired Thinking: Keep Responsibilities Clean

One idea that carries over beautifully from Java and backend engineering is separation of concerns.
We didn't want application logic to become:
if aws:
...
elif local:
...
elif some_other_provider:
...
everywhere.
Instead, we introduced provider abstractions.
Conceptually:
Application
↓
Provider Interface
↓
┌───────────────┬────────────────┐
│ Local Provider│ AWS Provider │
├───────────────┼────────────────┤
│ SQLite │ DynamoDB │
│ Local LLM │ Bedrock │
│ Local Embed │ Titan Embed │
└───────────────┴────────────────┘
The core application doesn't need to know every infrastructure detail.
That's the kind of abstraction that makes a system easier to evolve.



The Real Challenge Wasn't the LLM

This was probably our biggest realization.
Calling an LLM is easy.
Building a reliable system around it is harder.
We ran into problems like:

Problem 1 - Multiple retrieval strategies

One fact may need to be searchable through:
Exact keyword
+
Semantic similarity
+
Graph relationship
+
Structured metadata
+
Access control
Making those systems work together without creating security holes became a major architectural challenge.



Problem 2 - Screen Capture Isn't Free

Our screen watcher initially captured screenshots every 20 seconds.
That meant unnecessary vision requests if nothing changed.
So we introduced a lightweight visual fingerprint:
Screenshot
↓
Resize
↓
Pixel Signature
↓
Compare Previous Frame
↓
┌───────────────┐
│ Changed? │
└───────┬───────┘
Yes ↓ No
OCR Skip
We also prevented overlapping OCR requests and retried when a later frame changed.
Small optimization.
Big difference in unnecessary AI calls.



Problem 3 - Browser Extension Reality

The first extension required manually putting a token inside:
background.js
That works for a developer.
It isn't a great product experience.
So we moved toward:
  • Chrome options page
  • Local token storage
  • Configurable project ID
  • Immediate first capture
  • Periodic changed-page detection
  • Google Docs support
  • Google Meet support
For Google Meet, the extension works with visible captions rather than independently transcribing audio.
That distinction matters.



Local First, Cloud Ready

We wanted the development experience to remain lightweight.

Local

FastAPI
+
Uvicorn
+
SQLite
+
Local Embeddings
+
Groq / Gemini

AWS-oriented

API Gateway
↓
AWS Lambda
↓
FastAPI / Mangum
↓
Bedrock
↓
Titan Embeddings
↓
DynamoDB
The application logic remains largely the same.
The infrastructure underneath can change.
That's the whole point of the provider architecture.



What We Actually Learned

We came into the hackathon thinking:
“We're going to build an AI knowledge assistant.”
We left thinking:
“We're building an information system with AI as one of its components.”
That's a very different mindset.
The LLM is powerful.
But the LLM isn't the whole system.
The real engineering happens around it:
Identity
↓
Authorization
↓
Data Modeling
↓
Indexing
↓
Retrieval
↓
Reasoning
↓
Citations
↓
Observability
And that is where the project became interesting.



What Comes Next?

ContextForge is still evolving.
Our next steps include:
  • Better production deployment automation
  • Native meeting transcript workflows
  • Improved browser-extension reliability
  • Project-aware folder watching
  • More end-to-end testing
  • Stronger production security
  • Better temporal/version handling
  • Cost and latency benchmarks across AI providers
Eventually, we want ContextForge to feel less like:
“Ask an AI about your documents.”
and more like:
“Ask your engineering organization a question.”



Final Scene

Every developer has experienced the same problem:
"I know someone explained this..."

"...but where?"
The knowledge isn't necessarily missing.
The context is.
ContextForge is our attempt to solve that gap.
It captures knowledge where it naturally appears, turns it into structured facts, preserves where those facts came from, respects who is allowed to see them, and retrieves the right context for the question being asked.
Because at the end of the day, building AI isn't just about making models smarter.
It's about giving them the right context.
And maybe that's the most important debugging lesson of all:
**Sometimes the bug isn't in the code.**The bug is that nobody can find the context.



AWS Terms Note

Before publishing, remove confidential or personal information, verify that all screenshots and source material are yours to share, and avoid implying AWS endorsement or affiliation.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article