CommonContext

Prepares a market’s sourced documents for the engine: an embedded reference library, and a proposed schema.

From a Market’s Wiki to the Engine’s Reference Library

A market’s knowledge is held in its domain wiki, which the sponsor writes and keeps. The engine cannot read a wiki as it stands. It needs the text split into passages and embedded, and it needs a schema that says who takes part and what a profile contains.

CommonContext (formerly KnowledgeSlot) is the open-source (MIT) tool that does that preparation. It reads a market’s curated sources (wiki pages, contracts, standards, trade guides, PDFs and spreadsheets) and produces two things: an embedded reference library that the Cosolvent engine loads and cites from, and a proposed domain schema, the participant roles and profile fields a marketplace is configured from.

It is a build tool, not a running service. It holds no knowledge of its own and does nothing at match time: searching the library, answering questions with citations and recording what the library could not answer are all done by Cosolvent.

What It Does

  • ✅ Conversion: PDF, HTML, CSV, XLSX and web pages become Markdown, each with a record of where it came from.
  • ✅ Reference library: the text is split at its headings, tagged by topic and embedded.
  • ✅ Schema proposal: an AI model drafts participant roles and profile fields from the documents, for a person to review.
  • ✅ Feeding Cosolvent: the schema configures the marketplace; the reference library is exported as a file that Cosolvent loads.
View Feature Sheet ↓ ← Back to Ecosystem

CommonContext Feature Overview

✅ Implemented    🔜 Planned    ➡️ Done by Cosolvent

Inputs and Conversion
✅Document conversionPDF (pymupdf4llm, or marker-pdf where OCR is needed), HTML, CSV and XLSX are converted to Markdown.
✅Fetch by URLA web page, or a PDF it links to, is fetched and converted.
✅Markdown and wiki pagesMarkdown is accepted as it is. Wiki pages are embedded through a separate step today; the one-command build does not read them yet.
✅Metadata extractionAn AI model reads each document and fills in its record: type, jurisdiction, standard body and similar fields.
🔜DOCX and imagesWord documents, and images through OCR.
Reference Library
✅Heading-based chunkingOne passage per section of the document, with its heading path attached.
✅Topic taggingEach passage gets one topic from a fixed list. Tag lists exist for two verticals so far, grain and manufacturing.
✅Embeddingtext-embedding-3-small at 1536 dimensions, the same model and size as Cosolvent’s own store.
✅Export for CosolventThe library is written as a JSONL file, which Cosolvent’s load-references command loads into its database.
Schema
✅Schema proposalAn AI model drafts a complete domain schema, participant roles and profile fields, from the documents in one step. The tool has no review step; a person should read the draft before using it.
✅Schema analysisFor an existing schema, proposes additions document by document. A person reviews the proposals and merges them by hand.
Curation Tool
✅Local web toolUpload or fetch documents, convert them, view each result with its provenance, and run schema analysis and metadata extraction.
🔜Passage reviewInspect individual passages and edit their tags.
🔜Staleness detectionFlag documents past their review date or with superseded sources.
Provenance
✅Document recordEvery document carries a record of its source address, title, fetch date and conversion method.
✅Passage to documentEvery passage names the document it came from. Page numbers are not recorded.
Done by Cosolvent, Not Here
➡️SearchCosolvent searches the loaded library at match time.
➡️Answers with citationsCosolvent answers questions only from the library and cites the passages it used.
➡️DuplicatesCosolvent skips identical passages when it loads the file.
➡️Gap signalsCosolvent records the questions the library could not answer. Turning those into new sources is the sponsor’s work, in the wiki.
Architecture
LanguagePython 3.10+
FrameworkFastAPI, with a single static page as the tool’s interface
DatabaseNone of its own. Its output is files; Cosolvent holds the database
AI ProvidersOpenRouter for schema drafting, tagging and embeddings; OpenAI as the embedding fallback
IntegrationA schema file and a JSONL export, both loaded by Cosolvent