name: 🚀 Feature Request
about: Suggest an idea or a new capability for FireForm.
title: "[FEAT]: "
labels: enhancement
assignees: ''
📝 Description
Generating a PDF form currently takes a significant amount of time, particularly when a template has many fields. I noticed that src/llm.py's main_loop() function loops over every field sequentially and makes a brand new HTTP request to the Ollama API for each individual field. This creates an O(N) performance bottleneck.
💡 Rationale
An O(N) approach is very resource-intensive because it forces the local LLM to completely re-read and re-process the incident context N times. If a firefighter uploads a form with 20 fields, the user could be waiting over a minute.
🛠️ Proposed Solution
We can optimize this into an O(1) operation by requesting all fields simultaneously in a single batch request.
✅ Acceptance Criteria
How will we know this is finished?
📌 Additional Context
I implemented this fix locally using llama3. For a standard 7-field form, generation time dropped to ~17 seconds total by eliminating the sequential looping overhead. I will open a PR for this shortly!
name: 🚀 Feature Request
about: Suggest an idea or a new capability for FireForm.
title: "[FEAT]: "
labels: enhancement
assignees: ''
📝 Description
Generating a PDF form currently takes a significant amount of time, particularly when a template has many fields. I noticed that src/llm.py's main_loop() function loops over every field sequentially and makes a brand new HTTP request to the Ollama API for each individual field. This creates an O(N) performance bottleneck.
💡 Rationale
An O(N) approach is very resource-intensive because it forces the local LLM to completely re-read and re-process the incident context
Ntimes. If a firefighter uploads a form with 20 fields, the user could be waiting over a minute.🛠️ Proposed Solution
We can optimize this into an O(1) operation by requesting all fields simultaneously in a single batch request.
src/✅ Acceptance Criteria
How will we know this is finished?
docs/.📌 Additional Context
I implemented this fix locally using
llama3. For a standard 7-field form, generation time dropped to ~17 seconds total by eliminating the sequential looping overhead. I will open a PR for this shortly!