Over the last few months, I've been working intensively with AI agents for enterprise use cases, either supervising or developing them myself. Through this experience Ive kept noticing a sometimes frustrating pattern: recurring mistakes still show up whenever a task requires working with exact elements within a set.
For example:
- counting occurrences
- detecting duplicates
- comparing sets
- checking coverage
- identifying what's missing or extra in a list
The classic example is: "How many r's are in strawberry?" While simple, in enterprise workflows, similar situations appear all the time: duplicated owners, missing checks, inconsistent lists, simple coverage validations.
These are not particularly complex problems, but they are not semantic problems; they are symbolic problems.
Modern models have improved significantly at handling these tasks. Techniques such as Chain-of-Thought reduce the error rate considerably in many scenarios. However, Chain-of-Thought is still a probabilistic reasoning strategy. It can improve an answer, but it does not make the validation itself deterministic. On the other hand, tools like Python and SQL can solve these problems perfectly, but they are general-purpose tools that we typically associate with larger analyses or more complex workflows.
That led me to a question: Is there a lightweight layer in between? Something simpler than Python, SQL, Prolog, or formal reasoning systems, but more reliable than asking the model to reason internally under probabilistic terms.
As an experiment, I built a small proof of concept called Lightweight Symbolic Validator
It's an experimental MCP tool that allows an agent to delegate symbolic checks to deterministic code whenever an exact answer is required. The goal is to reduce the need for "guessing" in situations where the answer should be fully verifiable.
After testing it, my conclusion is more nuanced than I initially expected. Current frontier models already solve many of these cases correctly, but don't provide any deterministic guarantee. The tool, under certain scenarios, generates a significant improvement on the response quality vs the no-tool scenario, although it requires further tuning and testing to be effective in a greater scale. Still, the experiment left me with an interesting question:
Should agents have a lightweight symbolic validation layer available by default? I'm talking about simple operations over: sets, sequences, duplicates coverage, basic relations
I've published the experiment on GitHub for anyone who wants to try it, provide feedback, or challenge the idea: https://lnkd.in/dpsSfbNQ
More than a finished solution, I see it as an exploration of a possible middle layer between semantic reasoning and heavier symbolic systems.
Happy to hear from people experimenting with agents development