The LLM Didn’t Need to See the Diagram. It Just Needed a Seat Number

Learn how Smart Notes Generator extracts diagrams from PDFs and reinserts them into LLM-generated notes. No lost diagrams, lower costs, full privacy.

miércoles, 29 de julio de 2026 • 4 min read • Q2BSTUDIO Team

Mantén los diagramas originales en tus notas con IA

In the world of AI-driven software development, there is a recurring temptation: to send all available content to the model so it can \'understand\' and process everything. However, experience shows that this approach not only increases costs and latency, but often generates inaccurate or outright wrong results. A clear example is automatic note generation from academic documents: what sense does it make to turn a PDF with diagrams into plain text where images disappear? The answer is none. That is why the principle behind an efficient architecture is simple yet powerful: the LLM did not need the diagram, just a seat number.

This concept comes from a practical project that aims to convert slides and documents into useful study notes without losing original illustrations. Instead of sending each image encoded in base64 to the model —which skyrockets input size and cost— diagrams are extracted locally and replaced with stable placeholders like \'{{IMG_001}}\'. The model receives the text with those markers, rearranges them in the generated structure, and a post-processing system restores the original images in the correct place. In other words, we separate responsibilities: the LLM handles reorganization and semantic reasoning; traditional software manages files, images, and reliability.

This design philosophy has profound implications for any company developing AI-based solutions. At Q2BSTUDIO, we firmly believe that intelligent systems should not be black boxes that try everything. Our approach is to integrate language models as components within robust software architectures, where each layer has a clear function. For example, when building custom software, we combine AI analysis capabilities with extraction, filtering, and post-processing processes that guarantee predictable results. The same applies in AI projects, where intelligent agents rely on data management systems that know exactly which information should reach the model and which should remain on the local side.

One of the most valuable lessons from this project is that not everything glitters is useful for the LLM. In a university lecture PDF, there are plenty of logos, slide backgrounds, decorative borders, and other visual elements that add no academic value. That is why, before assigning a placeholder, filters based on dimensions, aspect ratio, file size, entropy, and duplicates are applied. This discards irrelevant images and reduces noise. However, the final decision is not automatic: the user can review a gallery and manually include those figures that the filter considered low quality but are crucial for the exam. It is a balance between automation and human control.

Another critical aspect is fault tolerance. Language models, due to their probabilistic nature, do not always follow instructions to the letter. They may omit a placeholder or move it incorrectly. To mitigate this, the nearby textual context of each extracted image is stored (keywords like \'transition\', \'state\', \'automaton\') and, if the placeholder disappears, the system scans the generated paragraphs and inserts it in the place with the highest lexical match. This fallback mechanism turns a potential failure into a smooth user experience.

The advantages of this approach go beyond note generation. Reducing the amount of data sent to the model lowers per-query cost and improves privacy, since original images never leave the local environment. For companies handling sensitive information, such as internal technical documentation or training materials, this is a step forward in cybersecurity. At Q2BSTUDIO, we provide cybersecurity services and also help migrate infrastructures to the cloud with cloud AWS/Azure, ensuring sensitive data remains protected. Moreover, by preserving original diagrams, \'AI slop\' —regenerated images that are never exactly the same— is avoided, maintaining academic or technical fidelity.

In the Business Intelligence field, this separation mindset is also key. A BI / Power BI solution should not send entire datasets to a language model to generate reports. The smart approach is to preprocess data, extract relevant metrics, and let AI draft contextualized conclusions. Exactly the same pattern: extract, mark, process, recompose. And in the realm of AI agents, the ability to decide what information to delegate to the model and what to keep in deterministic flows makes the difference between a useful assistant and one that rambles.

From a technical perspective, the design of such systems aligns with traditional software engineering principles: modularity, separation of concerns, and exception handling. AI is not a monolith that solves everything; it is one more component integrated with databases, business logic, and presentation layers. At Q2BSTUDIO, we apply this philosophy in every project, whether developing process automation or implementing AI solutions that deliver measurable value.

Ultimately, the best artificial intelligence engineering does not consist of asking the model to do absolutely everything. It consists of assigning it the right job and surrounding it with reliable, boring, predictable software. The diagram did not need to be seen by the LLM; it needed a seat number. And the rest of the system takes care of the rest. That is the difference between an impressive demo and a real product that works in production.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.