Product updates

– 5 min read

Writer RAG tool: build production-ready RAG apps in minutes

Hollis Kool

Writer RAG tool: build
production-ready RAG apps in minutes

TL;DR by Writer

We’ve launched a predefined RAG tool, enabling apps built on the Writer platform to autonomously retrieve and use data from a Knowledge Graph with just a simple API call. Integrated into Writer’s full-stack platform, it eliminates the need for complex vendor RAG setups, making it easier to build scalable, highly accurate AI workflows just by passing a graph ID of your data as a parameter to your RAG tool.

We recently launched Palmyra X 004, our new frontier model, and a leader in LLM performance and tool calling benchmarks. To extend its powerful capabilities, we’re releasing a predefined RAG tool that apps built on Writer AI Studio can call autonomously. Whether you’re building an app to query a large set of unstructured data, or need quick data references in a larger AI workflow, the RAG tool majorly simplifies the process of building a high-quality RAG system, all through a simple API call.

The RAG tool provides a solution that was missing in the market. It offers an easy-to-use API to create AI applications that use RAG, all on one platform — a platform designed to meet the performance requirements of real-world enterprise use cases. Combined with Writer’s industry-leading RAG approach, our tool offers unmatched accuracy, speed, cost, and reasoning capabilities, helping you to effortlessly create market-leading AI apps.

In this post, we’ll cover how the RAG tool transforms traditional app development methods. We’ll also show you how to use the tool to build your own highly-accurate, production-ready RAG app in minutes.

To get building now, you can read our guide.

Simplifying RAG implementation with the RAG tool

Traditionally, setting up custom AI apps with RAG systems involves using multiple vendors to get to a functioning proof of concept (POC) app. While it’s possible to create a basic POC, with today’s tools, achieving the accuracy, scalability, and performance required for real-world deployment is another matter.

DIY RAG app vs. RAG app with Writer
Building a RAG app DIY vs. with Writer AI Studio and the new RAG tool

Developers often need to work with multiple vendors (like Langchain, Weviate, Pinecone, and more) to set up complex RAG pipelines for data embedding, retrieval systems, database scaling, and API integration. These are good, and fairly easy to build with today. But they may not be accurate enough for use cases that need accuracy of over 70% (Writer Knowledge Graph achieves 86%) or, if you’re using multiple vendors, they may not be able to handle changing data at scale.

With tool calling on the Writer platform and the RAG tool, we eliminate the need to:

  • Manually implement logic for query interpretation, retrieval, and ranking
  • Manage complex APIs and orchestration for retrieval and LLM interactions
  • Continuously engineer for scaling as data volumes grow
  • Build with and integrate multiple vendors — instead, only use the Writer full-stack platform for every component of a RAG app

The RAG tool adds to our all-in-one RAG suite on Writer’s full-stack platform, combining an LLM, RAG, developer tools, and our graph-based Knowledge Graph databases. This tool not only simplifies building RAG applications but also delivers production-ready, enterprise-grade performance through Writer’s Knowledge Graph.

Example: building a Hacker News app with the RAG tool

To demonstrate the speed of using the RAG tool with Palmyra X 004, we built a HackerNews listener app. In minutes, we connected the Hacker News API, built a Knowledge Graph in Writer, and launched the chatbot interface. Here’s how we built it:

  1. Create the graph-based database: We hooked up the Hacker News API to a Writer knowledge graph, which more accurately organizes the data for better retrieval than most other vector databases on the market. Read our guide on building a Knowledge Graph.
  2. Configure the RAG tool: We passed the graph ID of the Knowledge Graph to the tool so Palmyra would know which graph to retrieve from.
  3. Build the app UI: Using Writer Framework on our developer platform, AI Studio, we used our low-code drag-and-drop UI builder and Python to make the chat app. Read more on how to do this.
  4. Write the code: Inside of our Writer Framework app, we wrote the Python code to scrape Hacker News, upload the files to the Knowledge Graph, and add the RAG tool to the Chat component.

With just the graph ID, Palmyra X 004 can access the Hacker News data automatically without any custom code or separate retrieval system. All we had to do was point the RAG tool toward the Hacker News KG. Here’s the code:

Python
def message_handler(payload, state):
    graph = retrieve_graph(GRAPH_ID)

    response = 
state["conversation"].stream_complete(tools=graph)

    for chunk in response:
        state["conversation"] += chunk

The Hacker News app demonstrates the speed and simplicity of building real-world RAG apps with the RAG tool. But the true power of this tool lies in its potential to transform far more complex scenarios. Imagine applications where the data is extremely sensitive,  intricate in structure, or constantly evolving — like healthcare records, financial transactions, or customer support databases. Having a RAG system that can accommodate these kinds of real data and RAG use cases is critical.

Ready to get started? Use Writer AI Studio to build your own app and explore its advanced features! Check out the code on GitHub, the Knowledge Graph chat support tool guide, and the Writer Framework documentation.

Reach out to our Director of Developer Relations on X or LinkedIn and let us know what you’re building!