Add a Text2Cypher tool

In this challenge, you will identify a question your existing tools cannot answer, create a Text2Cypher tool to handle it, and verify the generated Cypher in the reasoning panel.

Step 1: Find a question your tools cannot answer

Think of a question your agent cannot reliably answer with its existing tools — one whose query structure depends on what is being asked, such as multi-hop aggregations, dynamic filters, or combinations your Cypher Templates do not cover.

If you are using Northwind, try one of these:

  • Which customers ordered products from more than two different suppliers?

  • Which products are in both the Beverages and Condiments categories?

  • List the top three customers by total order value.

Ask the question in the preview panel and note the response. The agent may refuse, guess, or return an incomplete answer. You will ask the same question again in Step 3 after adding a dedicated tool, to compare the difference.

Step 2: Create a Text2Cypher tool

Open the agent configuration and add a new Text2Cypher tool.

Set the Name to something descriptive that reflects its purpose, for example Answer Customer Questions..

In the Description, tell the agent when to use the tool and provide domain context to help it generate accurate Cypher:

  1. When to use it: when no other tool covers the question and a dynamically generated query is needed.

  2. Domain context: the agent already receives the full database schema automatically — do not list all labels and relationship types. Instead, add context the schema does not provide: the shape of identifiers (for example, "Customer IDs are uppercase codes like ALFKI"), which categorical property values are useful for filtering, and which numeric properties are suitable for aggregation.

For Northwind, relevant domain context includes that customer IDs are uppercase codes (ALFKI, QUICK), that unitPrice and quantity are numeric properties suitable for aggregation, and that freight is a cost field on orders.

Save the tool and click Update agent.

Step 3: Ask the question again and compare

In the preview panel, ask the same question from Step 1.

Expand the Thought section and find the Applying agent tool entry for your Text2Cypher tool. Compare the results with the existing tools:

  • Generated Cypher: Does it use the correct labels and relationship types for your graph?

  • Output: Does the result set match what you expected?

Most importantly, does it provide a more accurate answer than the existing tools?

If the generated Cypher uses wrong labels or relationship types, edit the tool description to add or clarify the domain context, then ask the question again.

Summary

You identified a question your existing tools could not answer, asked it to see the gap, created a Text2Cypher tool with a when-to-use description and domain context, and asked the question again to compare the results.

In the next lesson, you will learn how to use the Similarity Search tool for semantic lookups.

Chatbot

How can I help you today?

Data Model

Your data model will appear here.