New Firestore Feature: Query Your Database in Natural Language, No Complex Parsers Needed

Firestore adds natural language querying, letting developers quickly build conversational database AI agents via context sets and a query endpoint.
Firestore introduces query data support enabling natural language database conversations. Define a context set in Firestore Studio to map concepts to collections and fields, then call the query data endpoint with the user's question and context set ID. Tune prompts with Gemini in Studio; the endpoint returns structured data, conversational answers, or clarifying questions. This removes the need to build query parsers, intent recognition, and entity mapping, reducing setup to a few steps and one API call.
Firestore's newly launched query data support lets developers build AI agents that converse with the database in natural language. This means users can ask questions directly in everyday language instead of writing complex query statements or relying on cumbersome parsers.
Core Mechanism: Context Sets and the Query Endpoint
Implementing this feature comes down to two steps: defining a context set and calling the query endpoint.
First, define a context set in Firestore Studio. This step is essentially "teaching" the AI agent to understand your data structure—mapping natural language concepts onto actual collections and fields. As shown in the video screenshot, the whole process requires no complex query parser.

Once the context set is defined, you can test prompts directly in Studio, for example asking "which user is upgraded today?". Gemini will adjust the query template accordingly until the results are reliable enough.

Next, make a simple call from your backend or frontend to the query data endpoint, passing in the user's natural language question along with the context set ID. Firestore parses the intent, executes the query, and returns structured data, a conversational answer, or even clarifying questions when your query is ambiguous.
Context Set is a configuration layer introduced by Firestore for natural language queries—essentially a semantic mapping table. It binds natural language concepts in your business domain (such as "user", "upgrade", "today") to specific collection paths (such as users), field names (such as plan, upgraded_at), and optional value range descriptions. This mapping lets the underlying model generate queries without guessing the table structure, avoiding errors like "field does not exist" or "semantic ambiguity". Context sets are decoupled from the database schema, can be versioned independently, and support defining multiple context sets for the same database to serve different business scenarios (such as customer service or operations analytics).
Query Data Endpoint is an API hosted by Firestore that receives a natural language question and a context set ID, performs intent parsing, query construction, and execution internally, and returns results as JSON. It packages the NL2SQL/NL2Query pipeline you would traditionally have to build yourself into a single call: developers no longer need to maintain parsers, entity recognition models, or query template engines. The "clarifying questions" returned by the endpoint are an interactive fallback mechanism—when a question lacks key information such as a time range or object qualifier, the system asks the user for clarification instead of returning an empty result or a faulty query.
Practical Workflow
The entire workflow can be summarized in three stages:
- Define the context set: In Firestore Studio, map natural language concepts to the database's collections and fields.
- Test and tune: Enter prompts directly in Studio for testing; Gemini optimizes the query template to ensure accurate results.
- Integrate and call: Call the query data endpoint in your backend or frontend code, passing in the user's question and the context set ID.

Firestore returns three types of results: structured data, conversational answers, and clarifying questions when necessary. This lets developers quickly turn raw Firestore collections into intelligent conversational assistants that answer complex database questions.
Gemini tuning the query template refers to the process in Firestore Studio where the system uses the Gemini model to iteratively refine the underlying query template based on test prompts. Every natural language question a developer enters is used to verify whether the template correctly maps to collections, fields, and filter conditions; when results deviate from expectations, the model adjusts field selection, operators, or aggregation methods in the template. This stage transforms query logic that traditionally relied on manual authoring into iterative, prompt-driven tuning, enabling even non-query experts to raise accuracy to an acceptable level through trial and error, ultimately solidifying it into a reusable context set configuration for production.
Significance and Outlook
This feature dramatically lowers the barrier to building conversational database interfaces. Traditionally, implementing natural language queries required developers to build complex query parsers and handle intent recognition and entity mapping—a massive amount of work. Firestore's new support reduces this process to a few configuration steps and a single API call.
For teams already using Firestore, this means they can quickly add natural language query capabilities to internal tools or customer support systems without rewriting the data layer. As AI agents become more widespread, this "conversation-as-query" model is poised to become the new normal for database interaction.
One-line Summary
Firestore adds natural language query capabilities, letting developers quickly build conversational database AI agents through context sets and a query endpoint.
Paragraph Summary
Firestore introduces query data support that lets developers converse with the database in natural language. The core mechanism has two steps: define a context set in Firestore Studio to map natural language concepts to collections and fields, then pass the user's question and the context set ID to the query data endpoint. Prompts can be tested and tuned with Gemini in Studio, and the endpoint returns structured data, conversational answers, or clarifying questions. The feature eliminates the heavy work of building your own query parser, intent recognition, and entity mapping, reducing the creation of conversational database interfaces to a few configuration steps and a single API call—significantly lowering the barrier, especially for teams already using Firestore who want to quickly add natural language querying to internal tools or customer support systems.
Related articles

Prompt Engineering for Beginners: From Writing Prompts to Engineering Thinking
Starting from the essence and four functions of prompts, this article systematically explains the six-step process, four success criteria, learning value, and practical limitations of prompt engineering to help you build a complete understanding.

Anthropic Launches Nasdaq IPO: AI Giant's Listing and Risk Disclosures
Anthropic officially launches its Nasdaq IPO under ticker ANT, with market valuation expected to potentially exceed SpaceX's record. The prospectus devotes nearly 100 pages to AI risks, while first-half revenue grew over 14x but net losses widened sharply, reigniting the AI bubble debate.

Rust cURL Clone Uses 4,832 unsafe Blocks—Is the Memory Safety Myth Broken?
A Rust cURL clone uses 4,832 unsafe keywords, challenging Rust's memory safety narrative. We analyze what unsafe really means, compare Fil-C, and examine rewrite motives.