
Architecture Tests: How to Enforce Architectural Rules Directly in Code
Architectural rules that exist only in documentation will sooner or later be broken. It's not a question of if, but when.
Go to content|Go to the main menu|Go to search
In the beginning, there was no grand plan to build an autonomous agent. There was just a table with 700 rows and a reluctance to spend weeks on a manual copy-paste marathon. We quickly rejected the classic route of a universal script, because writing a scraper with a set of regular expressions that would reliably pull information from hundreds of different websites would be programming suicide. There weren't many other automation options, so the question arose: “What if we unleashed this magical AI thingy on it?”
What followed was quick research into frameworks, AI-native tools, and libraries (I admit to using ChatGPT) that might make sense for our use case, a bit of inspiration from YouTube, and then VS Code, a few lines in Python, trying an OpenAI API call, assembling an agent in the LangChain framework, and giving it its first tool. The result?
"Holy crap, the outputs are actually no worse than manual analysis.”
Suddenly, it clicked. If we throw the web's chaos at the model, it finds the context itself. We don't need to write a parser for every single page. We knew we'd hit other complications, that there would be issues with hallucination, output consistency, and that one promising attempt means nothing. From that moment on however, it was clear that we would give AI a shot.
Gradually, more tools were added, and the whole thing snowballed.

As expected, we almost immediately encountered a fundamental problem with LLMs during development: hallucination and inconsistency. If we gave the agent too much freedom over the procedure and tool selection, it often got stuck in a loop, forgot the goal, skipped important steps, and returned incomplete and, crucially, inconsistent outputs. The cognitive load was too high, and a fully autonomous agent in the sense of ReAct (Reasoning - Acting)—where the agent thinks → acts → observes → thinks again—did not make sense for our needs.
We therefore had to abandon maximum autonomy and switch to a managed pipeline. Python maintains a fixed process structure, while AI serves as the cognitive engine within individual steps and the brain that evaluates outputs from tools and decides if it's okay to proceed to the next step.
The resulting process looks like this:

Let's look at one of the steps in a bit more detail. If you think of developing this agent as cooking a delicious meal, extracting financial data would be its main ingredient. Czech companies often publish financial statements in the collection of deeds as scanned PDFs (images), which are unreadable for common text scrapers.
We built the solution on multimodal models (Vision LLMs) without using traditional OCR (Optical Character Recognition). The pipeline automatically:
This approach is more robust than classic OCR. The model sees the table as a whole, ignoring noise, stamps, signatures, and crooked scanning, and returns structured data.
It is important to mention that with automated data collection, you are walking on thin ice, both technically and ethically. Automation doesn't mean being reckless. Our tool is not an aggressive bot that mindlessly sucks the internet dry.
Developing the tool wasn't just about assembling libraries, but primarily about dealing with the limits of current large language models:
Maybe I haven't convinced you yet that it's worth programming a tool like this. So why?
Because of scaling. When you need to analyze five, ten, maybe even fifty companies, you can do it by hand. What if next time you have seven hundred?
Honestly? If we counted development hours against just that one spreadsheet, it might not have paid off in terms of time. But it's not just about that. We now have a replicable pipeline that combines the reliability of Python scripts with the LLM's ability to understand unstructured content.
If a request comes tomorrow to analyze another market segment, the idea won't make our hair stand on end in horror. Scaling from fifty companies to five hundred is no longer a question of weeks of human labor, but just running a script and spending a few dollars on API fees. And that gives us the freedom to focus on what AI can't do (yet).
Golden Retriever was created as a pragmatic reaction to a boring task. It shows that integrating AI into company processes doesn't have to mean a revolution and can significantly free up people's hands.
Just like a four-legged companion, however, this Retriever needs a leash. If you give him too much space and don't watch him, you might be surprised to find that he's quite a bit of a dummy.

Architectural rules that exist only in documentation will sooner or later be broken. It's not a question of if, but when.

Software development is a dynamic field in which new tools and trends are constantly emerging. However, if we want to develop high-quality software, it is not enough to simply apply these tools and trends; we must truly understand how they work and what risks they may entail.
Thank you for your interest in subscribing to our newsletter! To complete your registration you need to confirm your subscription. We have just sent you a confirmation link to the email address you provided. Please click on this link to complete your registration. If you do not find the email, please check your spam or "Promotions" folder.
