Cogni

Inspiration

Workplace knowledge is rarely missing; it is usually scattered, outdated, or contradictory.

A change may be approved in a ticketing system while the corresponding procedure still contains the old value. A deployment script may be deleted from a code repository while an internal runbook continues telling engineers to use it. Team conversations, onboarding guides, and printed instructions can all disagree, leaving employees to determine which source they should trust.

Traditional enterprise search helps people find these documents, but it does not necessarily recognize that they conflict. An AI assistant can make this worse by selecting one source and presenting its answer confidently without warning the user about competing information.

We built Cogni to answer a different question: Which pieces of company knowledge could mislead someone, and who should fix them?

What it does

Cogni connects knowledge from sources such as documents, conversations, ticketing systems, code repositories, and internal tools to form a unified organizational knowledge graph.

It detects issues including:

  • Conflicting values across documents and systems
  • Documentation made stale by an approved change
  • Runbooks that reference deleted files or disabled workflows
  • Important decisions that only exist in team conversations
  • Frequently asked questions with no documented answer
  • Documents with inactive or missing owners
  • Answers that become unstable as retrieval paths change

When an employee asks a question, Cogni returns the best-supported answer while warning them if relevant sources disagree. Every answer records a trace of the entities, passages, claims, and sources used to produce it.

Administrators can inspect each anomaly in a review interface containing the original evidence, source links, ownership information, and a grounded AI advisor. The advisor explains the issue, recommends a correction, and gives source owners the evidence they need to resolve it confidently.

After a source is updated and re-ingested, Cogni marks affected historical traces as drifted and can replay the original questions to verify that the updated knowledge now produces a stable answer.

How we built it

Cogni uses a TypeScript SpacetimeDB module as its graph and state layer. The graph stores people, artifacts, chunks, entities, aliases, claims, change events, findings, actions, and retrieval traces.

Connectors and ingestion workers are written in Python. They normalize content from each external system into a shared representation. Entities are unified through normalized aliases, while claims are represented using structured fields such as:

  • Entity
  • Predicate
  • Normalized value
  • Scope
  • Modality
  • Source
  • Authority
  • Validity

Most anomaly detection is deterministic. Detectors operate only on entities and artifacts touched by an update, avoiding full-graph scans on every write. Embeddings help retrieval locate relevant passages, while language models are restricted to tasks such as extracting difficult claims, judging ambiguous text, writing grounded answers, and explaining findings.

The product interface is built with Next.js, React, and TypeScript. It includes employee question answering, anomaly review, entity exploration, trace inspection, and replay comparison.

Challenges we faced

The largest challenge was avoiding false positives. Two documents containing different values do not always conflict. They may apply to different regions, describe different time periods, use equivalent units, quote historical values, or propose a future change.

We therefore had to model scope, modality, validity, authority, and normalized units instead of naively comparing text.

Another challenge was preserving identity as documents changed. Chunk and claim IDs are derived from stable locations rather than content. An edit changes the content hash while preserving the node’s identity, allowing Cogni to identify exactly which historical traces were affected.

We also had to keep detection tractable. Comparing every document or trace against every other one would not scale, so detectors use indexed entity and predicate lookups, bounded candidate sets, and deterministic graph traversal.

What we learned

We learned that provenance is just as important as retrieval. Producing an answer is not enough; users need to know where it came from, what disagreed with it, and whether its supporting evidence has changed.

We also learned that language models work best as bounded components rather than the entire decision system. Deterministic rules handle structured comparisons reliably, while models are reserved for ambiguous language that rules cannot safely classify.

What’s next

Future work includes enforcing source-level permissions, improving retrieval indexing for much larger organizations, expanding temporal reasoning, and integrating additional enterprise systems. We also plan to further optimize trace anomaly detection through richer trace fingerprints, scope-aware indexing, adaptive candidate ranking, and incremental comparison. These improvements would reduce work within each localized entity-and-predicate candidate set while preserving unusual but important historical traces.

We would also like to notify owners through their existing workflows while preserving Cogni’s central safety rule: Cogni identifies and explains the problem, but humans remain in control of the source of truth.

Built With

Share this project:

Updates

Submission history