- 01 · IngestContracts in any format
- Scans
- Docling OCR
- 02 · ExtractSchema-based, then checked
- Mastra AI
- LLM
- Validation
- 03 · IndexSearchable by meaning
- NLP
- Embeddings
- OpenSearch
- 04 · ChatChatbot with its own MCP tools
- MCP server
- Tool calls
- Dynamic export
Contract analysis system
An internal system that reads contracts, extracts the key terms into validated, structured data and makes the whole contract base searchable by meaning. On top sits a chatbot that works with the contracts through its own MCP server.
- Docling
- OCR
- Mastra AI
- LLMs
- NLP
- Embeddings
- OpenSearch
- MCP
- Chatbot
- Python
- TypeScript
Show detailsHide details
- Docling turns scanned and digital contracts into clean, structured text, with OCR, layout and table recognition.
- Extraction and validation run as Mastra AI workflows: the model fills a defined schema, and checks run before anything is stored.
- NLP steps clean and segment the text before it is embedded with a large embedding model.
- OpenSearch serves as the vector database, combining semantic search with classic keyword search.
- A chatbot on top, backed by an MCP server I built from scratch: several tools the model can call, including a dynamic export of contract data.