Case study · Farsight

Trusted answers from messy documents. Even when people disagree.

As Omara's founding engineer, I built the system that turns messy documents into trusted ground truth: a labelling platform where many people annotate, disagree and settle on one answer, and a knowledge graph that makes thousands of documents searchable in plain language.

Role
Founding Full-Stack AI Engineer
Company
Omara Technologies
Timeline
Oct 2024 – Jan 2026
Team
Solo, end to end

Three labelers, one field

Total amount

  • Labeler A₹12,450
  • Labeler B₹12,450
  • Labeler C₹12,540

Settled value

₹12,450

Majority, 2 of 3

01The problem

AI is only as good as its ground truth.

Teams that extract data from documents, or evaluate AI that does, need answers they can trust. Getting those answers by hand runs into three problems.

People disagree

Give the same document to three labelers and you often get three answers. Someone has to decide which one is right, field by field.

Documents are messy

Multi-page PDFs, repeating sections, nested fields and several languages. Members, payments and line items appear in any order.

AI needs ground truth

You can't measure or train a model without answers you trust. Without them, evaluation is guesswork.

Omara needed two things. The first was a way to produce trusted ground-truth data from documents at scale, to evaluate and train AI. The second was a way to make large document collections searchable without knowing a query language. I was the first engineer, so I built both.

02What I built

Two products, one goal.

Both turn unstructured documents into something reliable: one through people, one through AI.

Labelling & ground-truth platform

Documents go to multiple labelers. Rules catch mistakes while people work, consensus settles disagreements, and experts arbitrate what's left. The output is gold data.

DocuNexus knowledge graph

AI reads documents into structured fields, builds a graph of the people, places and events in them, and answers plain-language questions with citations.

03A labeler's day

From sign-in to submitted task.

A labeler signs in, sees their projects, earnings and productivity, picks up a task from the queue and annotates it in the workspace. Every common action has a keyboard shortcut, because a labeler repeats it hundreds of times a day.

FFarsight · Sign in
farsight.app/login
L2

Farsight

Sign in to your labelling workspace

you@company.com
Sign in

Forgot password?

*Actual product differs

04Ground truth

From many opinions to one trusted value.

The labelling platform moves each document through six stages. Automation handles everything it can, and people step in only where they're needed.

  1. 01

    Import

    PDFs and pre-annotations, in bulk from S3 or ZIP

  2. 02

    Distribute

    Each file goes to several labelers, never twice to one person

  3. 03

    Annotate

    Boxes and values on the PDF, checked by rules live

  4. 04

    Reconcile

    Four-tier consensus, field by field

  5. 05

    Arbitrate

    Experts settle only the fields still in conflict

  6. 06

    Gold data

    Trusted values, labeler scores, JSONL export

How a disagreement gets settled

Every field runs through the tiers in order and stops at the first one that settles it.

  1. Tier 1

    Unanimous

    Every labeler gave the same value. Accept it.

  2. Tier 2

    Majority

    More than half agree. Accept the majority value.

  3. Tier 3

    Algorithmic

    Values differ slightly. Edit distance within a threshold decides.

  4. Tier 4

    Human expert

    Still in conflict. Escalate this field, and only this field, to arbitration.

Matching repeated items across labelers

When a document has several members or payments, labelers annotate them in different orders. The Hungarian algorithm pairs them up on a weighted score before consensus runs.

Value similarity
60%
Position on the page
30%
Labeler agreement
10%

05Knowledge graph

From documents to digital intelligence.

An organisation designs its ontology with AI, uploads its FIR records as CSV or JSON, and lets the GraphRAG engine build the graph in the background. Then anyone in the organisation can ask questions in plain language and get answers backed by the FIRs they came from.

DDocuNexus · Sign in
docunexus.app/login
AN

DocuNexus

Sign in to your organisation's knowledge graph

Sign in

Single sign-on available for your organisation

*Actual product differs
  1. 01

    Ingest

    From Google Drive, S3 or local folders, synced incrementally

  2. 02

    Extract

    Gemini reads up to 20 PDFs per call into a field template

  3. 03

    Connect

    Entities and relationships in Neo4j, each tied to its source file

  4. 04

    Embed

    Node summaries and 768-dimension vectors for semantic search

  5. 05

    Ask

    An agent runs vector search and generated Cypher in parallel

Every extracted value carries a bounding box and a confidence score, and every graph entity links back to its source document. An answer is only useful if you can check where it came from.

06My role

Founding engineer. Every layer, solo.

I designed and built both products end to end, from database schema and algorithms to the screens labelers and experts use every day.

products, built solo
2
API endpoints
100+
validation rule types
9
consensus tiers
4
document languages
3

Labelling platform backend

Built

The engine behind every task, rule, score and settled answer.

  • 100+ REST endpoints across 25+ services, with Swagger docs and integration tests.
  • Five roles, from labeler to client subject-matter expert, with project-level access for client teams.
  • Task distribution in parallel or series, with repeat cycles and no labeler ever seeing the same file twice.
  • Real-time notifications over server-sent events, plus scheduled daily reports and nightly consensus runs.
  • Go
  • Gin
  • PostgreSQL
  • GORM
  • AWS Lambda

Consensus, scoring & arbitration

Built

Turns several imperfect answers into one trusted value, and shows who to trust.

  • Four-tier consensus run independently for every field.
  • Instance matching across labelers with the Hungarian algorithm, so the order people annotated in doesn't matter.
  • Arbitration that escalates only the conflicting fields, with auto-filled values for the rest.
  • Labeler quality scores, accuracy trends and calibration flags.
  • Go
  • Levenshtein distance
  • Hungarian algorithm

Annotation workspace

Built

Where labelers spend their day, so it had to be fast and hard to get wrong.

  • PDF annotation with bounding boxes and text spans: drag, resize and work across multiple pages.
  • ML pre-annotations shown for review instead of starting from blank.
  • A live violations panel that flags rule breaks as the labeler works.
  • Task timer, skip-with-reason, session recovery and a guided onboarding tour.
  • Next.js
  • React
  • TanStack Query
  • react-pdf
  • shadcn/ui

Validation & quality tooling

Built

Catches mistakes while labelling instead of after it.

  • Nine rule types, from regex and ranges to cross-field checks like subtotal plus tax equals total.
  • Approval by consensus, by rules or by hand, with auto-approve thresholds.
  • Side-by-side arbitration screen with each labeler's value attributed.
  • Analytics on throughput, agreement and labeler performance over time.
  • TypeScript
  • Zod
  • Chart.js
  • ReactFlow

DocuNexus extraction

Built

Reads documents in three languages into clean, structured, checkable fields.

  • Template-driven extraction, up to 20 PDFs per model call, validated against Pydantic schemas.
  • A bounding box and confidence score for every value, so a person can verify it.
  • Hindi and Bengali detected and translated to English, with the original language kept.
  • Context caching and per-job cost tracking to keep model spend visible.
  • Python
  • Gemini
  • Pydantic
  • Flask

Knowledge graph & search

Built

Lets anyone question a document collection in plain language and see the sources.

  • Graph built from a declarative relationship file, with duplicate entities merged.
  • Every entity linked back to the document it came from.
  • Seven-step agent that runs semantic search and generated Cypher side by side, retrying failed queries up to three times.
  • Answers with citations and ten turns of conversation memory.
  • Neo4j
  • LangGraph
  • LangChain
  • Embeddings

07Key decisions

Five calls that shaped the work.

01/Quality

Escalate fields, not documents

4

tiers before a human

The problem
When labelers disagree, the usual fix is to send the whole document to an expert. Experts are scarce and most of each document was already agreed.
What I did
I ran consensus per field, in four tiers: unanimous, majority, edit distance, then human. Only the fields that fail every automatic tier go to arbitration, and the rest arrive pre-filled.
What happened
Expert time goes only where people genuinely disagree, and every settled value records how it was decided.

02/Algorithms

Match answers, not positions

60 · 30 · 10

value · position · agreement

The problem
On repeating sections, like several members or payments, labelers annotate in different orders and different counts. Comparing item 1 to item 1 is meaningless.
What I did
I paired instances across labelers with the Hungarian algorithm over a weighted score: value similarity, position on the page, and agreement. Similarity is type-aware for dates, numbers and text.
What happened
Consensus works on repeating sections regardless of annotation order, and missing items are handled instead of breaking the match.

03/Validation

Catch errors while people work

9

rule types

The problem
Mistakes found at review time cost a full round trip: reject, reassign, re-label.
What I did
I built a rule engine that checks annotations live: formats and ranges, plus cross-field logic like totals, date order, uniqueness and required-if conditions. Projects can run in strict mode.
What happened
Labelers see violations as they annotate, and reviewers get cleaner submissions.

04/Reliability

Change the engine mid-flight

2

distribution strategies

The problem
New distribution strategies were needed while live projects were still running on the old model.
What I did
I added parallel and series strategies through nullable columns so existing projects kept their behaviour. Task assignment runs inside transactions so two labelers can't claim the same task, and stale tasks retire automatically.
What happened
New projects got the new strategies without migrating or disrupting the old ones.

05/AI & search

Ask the documents, not a database

2

search modes in parallel

The problem
The people who needed answers from thousands of FIRs couldn't write graph queries, and keyword search misses meaning.
What I did
I built an agent that runs semantic vector search and model-generated Cypher in parallel, retries failed queries with the error as feedback, and answers with citations to the source documents.
What happened
Plain-language questions return grounded answers, and every claim points back to a document.

08Results

What shipped.

Solo

Two products and three codebases, designed, built and shipped by one engineer.

As Omara's founding engineer I owned every layer: the Go backend, the Next.js workspace, the consensus and scoring algorithms, and the AI and graph pipeline.

REST endpoints across 25+ services
100+
user roles, including client admins and experts
5
live validation rule types
9
languages read: English, Hindi, Bengali
3
dimension embeddings for semantic search
768

09Stack

The right tool for each layer.

Backend
GoGinGORMFlaskPython
Frontend
Next.jsReactTypeScriptTanStack Queryshadcn/uireact-pdf
AI
GeminiLangGraphLangChainEmbeddingsPydantic
Data
PostgreSQLNeo4jS3
Cloud
AWS CognitoLambdaEventBridgeAmplifyDocker

10Reflection

What I took away.

Ground truth is a process, not a dataset.

The hardest part wasn't any single algorithm. It was designing the path a disagreement takes, from three labelers to one trusted value, so that every step is automatic until it genuinely needs a person.

Being the only engineer meant owning every trade-off, from database columns to the button a labeler clicks. It taught me to build for the person doing the work, and to keep every answer traceable to its source.

Let's work together

Building something that has to be exactly right? Let's talk.