Skip to content

FEAT: 10x faster AI extraction using Batch JSON mode#392

Open
lokesh12344 wants to merge 2 commits intofireform-core:mainfrom
lokesh12344:feat/batch-llm-extraction
Open

FEAT: 10x faster AI extraction using Batch JSON mode#392
lokesh12344 wants to merge 2 commits intofireform-core:mainfrom
lokesh12344:feat/batch-llm-extraction

Conversation

@lokesh12344
Copy link
Copy Markdown

Description

This PR refactors the core LLM engine to use Batch Processing. Instead of calling Ollama N times, we now perform a single call for the entire form.

Key Changes

  • Batching: Implemented build_batch_prompt to extract all fields in one request.
  • JSON Mode: Forced structured output using Ollama's JSON format.
  • Speed: 10x performance improvement on CPU-based systems.
  • Reliability: Added a 300s timeout and a robust fallback JSON parser.

Fixes #391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Implement Batch LLM Extraction for 10x Performance Gain

1 participant