Go back
Macros: Turning Co-Pilots into Auto-Pilots
Cognition's new Macros feature automates tasks using natural language, making it easier for domain experts to extract document information and boost productivity.
Leo Püttmann
8/14/2024
Over recent months, we have constructed countless CoPilots using RAG technology on our Cognition platform. New LLMs, improved embedding models, faster data stores—the list of technologies helping us achieve good results grows larger every month. We understood from the outset that LLMs were not the bottleneck and instead concentrated on other aspects of RAG, such as data retrieval and data understanding, to deliver successful projects in this space.
Now, we have reached a point where we want to explore what comes next. And we are confident that the next frontier for the RAG space is automation.
That’s why we have developed Macros, our solution to transform Co-Pilots into Auto-Pilots.
In the context of computing and programming, a macro is a set of instructions or commands grouped together as a single command. When this single command is executed, it automatically expands into the set of instructions to perform a particular task. This helps to simplify complex or repetitive tasks, making them more efficient and easier to use.
Bringing technical and domain experts together
With Cognition, we have already built an extensive platform laser-focused on enabling you to create effective, scalable RAG projects in a short amount of time. Cognition offers:
- Quick and easy integration of different LLMs
- Native integration of fast and efficient data stores
- Various data transformation tools
- Reranking and search models developed by Kern AI
- Tools for effortless customization
While this platform excels in addressing the technical aspects of a project, it overlooks a critical component of every RAG project: domain knowledge.
What we have noticed in our projects is that domain knowledge about the data you want to use is a critical component that is not optional. We are convinced that it is not possible to create a working, production-ready RAG project without a thorough understanding of the actual business processes and interdependencies of the data.
Like programming with natural language
We created the macro feature with domain experts in mind. Domain experts are often highly knowledgeable individuals with extensive experience in data, products, and processes. However, they are frequently not technically inclined, meaning they may have little to no programming skills or struggle with overly technical software.
That’s why we have made macros extremely easy to use. A domain expert can simply outline the steps and requirements for a process. What information is needed? What should this information look like? Where can it usually be found? All this can be chained together, and the underlying LLM will then implement those instructions. It is even possible to implement rules, such as: extract value X, and if it’s higher than Y, go this route; if not, go the other one. Easy!
The macro will still utilize a cognition process, which can be modified by an engineer if needed. But the domain expert does not need to worry about this and can focus solely on the data and the business logic.
In essence, the macro feature is like programming—but with natural language! That’s the beauty of LLMs: you can express your desired output using just language, with no need for any programming languages or other complex tools. You already have everything you need to get started quickly.
How to get started with Macros: A simple example
Let's start with an example to highlight how you could use this. As an example, consider a simple form filled out by a customer who wants to apply for new insurance. Something like this:
Forms like these are very common, and the information we need to extract is usually the same. The challenge is that a) the information can often be found in different places, especially if there are multiple form types or a non-standardized approach, or b) information may be missing.
This is where we leverage the power of GenAI on our platform. Using the macro feature, you simply write down what you need, and the system handles the rest. Just describe what you want and what details are needed—that’s it.
In our newly created macro, we capture the following information:
- Name
- Address
- Phone number
Simple enough. However, we then require some more in-depth information. For example, we need to extract the company policy numbers and entries from the sections. This can be quite difficult to extract using a rule-based system, especially considering that the information was handwritten in a text field. While technologies like Optical Character Recognition (OCR) have been around for a while, they can often be inaccurate or require more setup, as pure OCR lacks the context-awareness needed for more complex documents.
This is where our vision approach comes in. We can pass an entire page or even a whole document and instruct a model to look for specific information, such as a job title or description. It doesn’t matter if this information is handwritten or machine-printed.
Let’s start by setting up some simple nodes to get the name and address.
We can create these flows simply using drag and drop. Afterward, we specify the information from the sections that we need. We also specify the format we want. In this case, we just want the number, but we could also retrieve additional information like the exact position or, while we’re at it, details about the policy itself.
And that’s it! All this only took minutes to set up. We can now pass one or multiple documents through the pipeline. The result is then presented in either a handy tabular view:
Or we can also inspect all results in a chat-style interface.
The whole execution for this document took about ten seconds to extract all the information. The amazing thing is that this is not only limited to this type of form but could be applied to other, similar documents from the get-go. Instead of hours, it now takes minutes to process a large number of documents.
Get started with Macros today!
Ready to revolutionize your document processing and automate your workflows? With Macros, you can harness the power of natural language programming to extract valuable insights from your documents quickly and efficiently. Whether you're a domain expert or a technical specialist, our platform is designed to be user-friendly and intuitive. Don't let complex forms and unstructured data hold you back any longer. Dive in and experience the future of document processing today. Try Macros and watch your productivity soar!
Sign up for our newsletter to get the latest updates on LLM.
Go to newsletter