Enterprise DNAEnterprise DNA
← Back to open-source discovery

A small build with a way to check it

A local model with a known-answer check

Send a synthetic extraction task to your own loopback Ollama server, then reject any response that does not match the expected answer.

Contract tested; inference not run15–45 min setup estimate, excluding model downloadEvidence: 2026-10-19

What goes in. What comes out.

Input
Synthetic invoice ID and currency in a short prompt.
Output
A checked model response, or a clear failure. No silent acceptance of plausible JSON.
You need
Ollama running locally, Python and an installed model that supports JSON output. Select a model that fits your hardware.

Build it

  1. Install Ollama using its official instructions and choose a supported model for your hardware.
  2. Run ollama list. Replace YOUR_INSTALLED_MODEL with an exact installed model name.
  3. Run the Python client. It sends only to 127.0.0.1 and validates the complete JSON answer.
ollama list
python build.py local-ai --model YOUR_INSTALLED_MODEL --output result.json

Run scripts only after reading them. Use an isolated environment. These examples do not install models, send mail or change business records.

Check the result

  • The answer must be exactly invoiceId EDNA-DEMO-1042 and currency NZD.
  • Incomplete, invalid or incorrect output stops the run.
  • Only loopback endpoints are accepted by this example.