Pular para o conteúdo

RAG na prática: o que aprendemos criando um sistema que entende o negócio antes de agir

At Code and Soul, we’re applying RAG — Retrieval-Augmented Generation — in real operations that connect technology, data, and purpose. Applied intelligence is no longer a concept; it’s a daily practice. Today, systems are being designed to understand business context, not just process information. And that’s where RAG stands out: it transforms scattered data into conscious decisions, replacing generic responses with contextual actions.


RAG is no longer a promise of AI. It’s already being used in corporate and operational environments to connect generative intelligence with living knowledge. Instead of relying only on what a model “knows,” the system retrieves information in real time, from databases, APIs, documents, and internal records, and uses it as a foundation for specific, grounded responses. It checks what’s real before acting. This changes the entire relationship between business and technology: AI stops being a reactive tool and becomes a cognitive layer that understands the business.


Inside Code and Soul, we built our own RAG architecture designed to adapt to different contexts. We didn’t want another generic model; we wanted a system capable of understanding each operation’s DNA, its language, nuances, and exceptions. It integrates with platforms like Odoo, DocumentDB, and Qdrant, using semantic vectorization to grasp meaning, not just keywords. Each client gains a unique semantic layer, their own intelligent vocabulary. What Ōkami interprets as a “fitness evaluation” is not the same as what Fabrik7 recognizes as a “table reservation,” and the RAG translates those distinctions, turning data into decisions with intent.


The result is an AI that doesn’t just respond, it acts with purpose.


At Ōkami, an integrated health and wellness ecosystem focused on physical and mental performance, RAG personalizes every interaction based on real data, training history, feedback, attendance, and individual goals. The system interprets behavioral patterns and adapts its tone accordingly. A new student receives supportive, educational guidance; a seasoned athlete gets concise, performance-driven feedback. All of this happens in real time through WhatsApp and Odoo.


The impact was immediate: a 27% increase in attendance and an 18% drop in cancellations within the first month. Students report feeling “accompanied,” even when the interaction is handled by AI. That’s the moment when RAG stops being automation and becomes applied consciousness.


At Fabrik7, our bar and living phygital lab, RAG connects menus, inventory, weather, and live events into a single layer of intelligence. The system understands the environment, whether it’s a hot Friday night, a packed venue, or a special event, and adapts its interactions accordingly. It suggests drink and food pairings, creates automatic campaigns, and even sends proactive messages based on customer behavior:


“Tonight we’ve got our red ale cold and ready, and the house burger on special until 9 PM”


These aren’t scripted responses. They’re generated by dynamically combining real data. The results are clear: customers who interact with the assistant via WhatsApp spend 23% more per visit, and weekly return rates rose by 18%. Inventory forecasting became sharper, and waste dropped significantly. RAG became the bridge between behavior, environment, and operations, intelligence translating the present into decisions.


In logistics operations, RAG serves another purpose: eliminating decision latency. It analyzes, interprets, and acts. The system connects stock data, routes, weather conditions, and delivery histories. When a new order is received, it instantly identifies bottlenecks and prioritizes flows automatically. If a problem arises, a delay, a blocked route, RAG doesn’t just flag it; it explains why, and suggests alternatives based on real operational data. This reasoning layer has reduced average delivery times by 22% and consistently improved client satisfaction scores.


RAG doesn’t replace existing processes; it integrates with them. It’s the bridge between automation and operational awareness.


Building this technology taught us a fundamental lesson: intelligence doesn’t live in the model, it lives in the context. The model is the brain, but context is the body that gives purpose to every decision. No matter how advanced an algorithm is, if it doesn’t understand a company’s language, pace, and exceptions, it’s still just a simulator of intelligence.


When properly implemented, RAG makes the model come alive. It understands what the company means, not just what it says.


What we’re building now is a layer of autonomy. RAG represents the point where automation stops following orders and starts understanding scenarios. It still depends on instructions, but it already learns from operational behavior and adjusts itself without reprogramming. That’s the foundation of cognitive organizations, systems that don’t just execute, but comprehend.


Instead of reports, they generate insights.

Instead of approval queues, they deliver trusted decisions.

Instead of fixed flows, they evolve with the business.


At Code and Soul, we believe applied intelligence isn’t about predicting the future, it’s about learning from the present and acting on it with awareness. RAG is the embodiment of that philosophy. It combines data, context, and intention to create systems that think with the business, not just for it.


Today, it’s already a reality.

Tomorrow, it will be the standard.

And when that happens, we won’t be talking about automation anymore, we’ll be talking about autonomy.

Liderando a Era Digital: A Combinação de Drupal, Site Studio e Design System