Prompting Guide
How you ask questions significantly impacts the quality of your results. This guide will help you write prompts that get you exactly what you need based on how Querri’s agent actually works.
Understanding How the Agent Works
Section titled “Understanding How the Agent Works”Before diving into specific prompting techniques, it helps to understand the agent’s workflow:
- Goal Setting - The agent translates your request into a specific goal
- Data Discovery - Searches your Library for relevant sources
- Selective Loading - Loads 1-2 most relevant sources (not everything!)
- Investigation - Examines the data structure and content
- Plan Creation - Designs steps to achieve your goal
- Execution - Runs the steps and presents results
Knowing this workflow helps you ask better questions.
The Three Types of Data Interactions
Section titled “The Three Types of Data Interactions”The agent uses three distinct approaches depending on what you need:
1. Finding NEW Data (not yet in project)
Section titled “1. Finding NEW Data (not yet in project)”When to use: You need data that isn’t loaded in the current project yet.
How the agent handles it: Searches your Library and automatically loads relevant sources.
Example prompts:
- “Analyze my sales data”
- “Load the customer database”
- “I need revenue and cost data”
2. Investigating LOADED Data (already in project)
Section titled “2. Investigating LOADED Data (already in project)”When to use: Data is already in your project and you want to understand it better.
How the agent handles it: Runs queries to examine the data structure and contents.
Example prompts:
- “What’s in the sales_data step?”
- “Show me statistics for the revenue column”
- “What are the top customers by spending?“
3. Creating ANALYSIS (final outputs)
Section titled “3. Creating ANALYSIS (final outputs)”When to use: You want visualizations, aggregations, or transformations that users will see.
How the agent handles it: Creates and executes a sequence of analysis steps.
Example prompts:
- “Create a bar chart of sales by region”
- “Aggregate revenue by month”
- “Forecast next quarter’s sales”
The Golden Rule: Be Specific
Section titled “The Golden Rule: Be Specific”The more specific your question, the better the AI can help you.
Vague vs. Specific
Section titled “Vague vs. Specific”Vague: “Analyze this data” Specific: “Show me monthly revenue trends for 2024”
Vague: “Look at customers” Specific: “Calculate the average order value for customers in the Northeast region”
Vague: “Clean the data” Specific: “Remove duplicate rows and fill missing values in the price column with the median price”
Specific questions give the AI clear direction about what you want to accomplish.
Structure of a Good Prompt
Section titled “Structure of a Good Prompt”Effective prompts often include:
- Action: What you want to do (show, calculate, create, find, filter)
- Subject: What data or metric you’re interested in
- Context: Time periods, filters, or conditions
- Format: How you want to see the results (table, chart type, etc.)
Examples
Section titled “Examples”“Show me [action] total revenue by product category [subject] for Q3 2024 [context] as a bar chart [format]”
“Calculate [action] the correlation [subject] between marketing spend and sales [context]”
“Filter [action] to orders [subject] where customer_type is ‘enterprise’ and order_date is after January 1, 2024 [context]”
Not every prompt needs all four elements, but thinking this way helps you be more precise.
Excellent Prompt Examples
Section titled “Excellent Prompt Examples”Here are examples of well-crafted prompts organized by use case:
Data Exploration
Section titled “Data Exploration”- “Show me the first 100 rows of the sales data”
- “What columns are available in this dataset?”
- “Give me summary statistics for all numeric columns”
- “How many unique customers are in the database?”
- “What’s the date range covered by this data?”
Filtering and Selection
Section titled “Filtering and Selection”- “Filter to transactions from January 2024”
- “Show only rows where status is ‘completed’”
- “Give me customers in California, Texas, or New York”
- “Select records where revenue exceeds $10,000”
- “Find orders placed on weekends”
Aggregation and Analysis
Section titled “Aggregation and Analysis”- “Show me monthly revenue trends for 2024”
- “Calculate total sales by product category”
- “What’s the average order value grouped by customer segment?”
- “Count the number of orders per day in March”
- “Sum revenue by sales representative”
Visualization
Section titled “Visualization”- “Create a line chart of daily active users over time”
- “Show me a bar chart comparing revenue by region”
- “Plot customer acquisition by month as an area chart”
- “Make a scatter plot of price vs. units sold”
- “Display a histogram of order values”
Data Cleaning
Section titled “Data Cleaning”- “Remove duplicate rows based on customer_id”
- “Fill missing values in the revenue column with zeros”
- “Standardize all date columns to YYYY-MM-DD format”
- “Trim whitespace from product names”
- “Replace null values in the category column with ‘Unknown‘“
Forecasting
Section titled “Forecasting”- “Forecast next quarter’s sales based on historical trends”
- “Predict revenue for the next 6 months”
- “Generate a forecast for daily active users through year-end”
- “Estimate customer growth for Q1 2025”
Advanced Analysis
Section titled “Advanced Analysis”- “Find correlations between marketing spend, website traffic, and revenue”
- “Identify customers whose spending has decreased by more than 20% compared to last year”
- “Calculate customer lifetime value by acquisition channel”
- “Show me the top 10 products by revenue growth rate”
- “Detect outliers in transaction amounts”
Multi-Step Analysis Requests
Section titled “Multi-Step Analysis Requests”You can ask for complex, multi-step analyses in a single prompt:
- “Load the sales data, filter to 2024, aggregate by month, and create a line chart”
- “Clean this data by removing duplicates and filling missing values, then show me total revenue by region”
- “Calculate monthly revenue, identify the top 3 months, and forecast the next quarter”
However, breaking complex requests into separate messages often works better:
- You can verify each step
- You can adjust direction if needed
- It’s easier for the AI to handle
Use your judgment based on complexity.
Time References
Section titled “Time References”Be clear about time periods:
Good Time References
Section titled “Good Time References”- “for 2024”
- “in Q3”
- “from January to March”
- “last 6 months”
- “year-over-year”
- “this quarter vs. last quarter”
Vague Time References
Section titled “Vague Time References”- “recently” (when exactly?)
- “this year” (calendar year or last 12 months?)
- “historical” (how far back?)
Column and Field Names
Section titled “Column and Field Names”When referencing specific columns:
If You Know the Exact Name
Section titled “If You Know the Exact Name”- “filter where order_status is ‘shipped’”
- “sum the total_revenue column”
If You’re Not Sure
Section titled “If You’re Not Sure”- “filter to completed orders” (AI will find the right status column)
- “sum revenue” (AI will identify the revenue column)
The AI is good at inferring column names, but exact names help avoid ambiguity.
Asking for Help
Section titled “Asking for Help”When you’re not sure what to ask:
- “What’s interesting about this data?”
- “What analyses would you recommend for this dataset?”
- “Help me understand customer behavior in this data”
- “What patterns do you see in the revenue data?”
The AI can guide you toward meaningful questions.
Refining Results
Section titled “Refining Results”If the first result isn’t quite right, refine iteratively:
Initial: “Show me revenue trends” Refinement: “Break that down by product category” Further: “Just show the top 5 categories” Polish: “Make that a stacked bar chart”
This conversational refinement is one of Querri’s strengths.
Common Pitfalls to Avoid
Section titled “Common Pitfalls to Avoid”Too Many Questions at Once
Section titled “Too Many Questions at Once”Avoid: “What’s the revenue by month, which regions are performing best, are there any trends in customer behavior, and can you forecast next quarter?” Better: Ask these as separate questions
Assuming Context Not Yet Established
Section titled “Assuming Context Not Yet Established”Avoid: “Now break that down by region” (when you haven’t created “that” yet) Better: “Show me revenue by region”
Overly Technical Language When Unnecessary
Section titled “Overly Technical Language When Unnecessary”Avoid: “Execute a SELECT statement aggregating sum of revenue_column GROUP BY month_field” Better: “Show me total revenue by month”
You can use SQL-like language if you prefer, but natural language usually works just as well.
Iteration is Encouraged
Section titled “Iteration is Encouraged”Don’t worry about getting the perfect prompt on the first try. Querri is designed for conversation:
- Start with a reasonable question
- Look at the results
- Ask follow-up questions to refine
- Repeat until you have what you need
This iterative approach often leads to better insights than trying to craft one perfect mega-prompt.
Prompt Templates
Section titled “Prompt Templates”Here are templates you can adapt:
Trend Analysis
Section titled “Trend Analysis”“Show me [metric] by [time period] for [date range]“
Comparison
Section titled “Comparison”“Compare [metric] between [group A] and [group B]“
Top/Bottom N
Section titled “Top/Bottom N”“What are the top [N] [items] by [metric]?”
Filter and Aggregate
Section titled “Filter and Aggregate”“For [filtered subset], calculate [aggregation] grouped by [dimension]“
Cleaning
Section titled “Cleaning”“Remove [issue type] and [fix another issue] in [column or dataset]“
Forecasting
Section titled “Forecasting”“Forecast [metric] for [time period] based on [historical range]“
Advanced: Understanding Agent Behavior
Section titled “Advanced: Understanding Agent Behavior”Goal Tracking and Deliverables
Section titled “Goal Tracking and Deliverables”When you ask for something, the agent sets a goal and tracks deliverables.
Example: “Create a sales dashboard with 3 charts”
- Goal: Build sales dashboard
- Deliverables: Chart 1, Chart 2, Chart 3
The agent tracks what’s completed and what’s remaining. If you ask for something new mid-conversation, it becomes a new deliverable.
Multi-Turn Conversations
Section titled “Multi-Turn Conversations”The agent can work across multiple turns (up to 30). It maintains context about:
- Your original request
- Previous steps created
- Data currently loaded
- Recent conversation
This allows natural refinement:
Turn 1: "Show me sales data"Turn 2: "Filter to 2024"Turn 3: "Create a monthly trend chart"Two-Step Processing Pattern
Section titled “Two-Step Processing Pattern”Sometimes the agent needs to prepare data before creating final outputs:
Turn 1: Aggregate data by month (preparation)Turn 2: Use aggregated data to create chart (deliverable)This is normal and ensures clean, well-structured results.
When the Agent Asks Questions
Section titled “When the Agent Asks Questions”If your request is ambiguous, the agent will ask for clarification:
- “Which date column should I use—order_date or ship_date?”
- “Did you want daily, weekly, or monthly aggregation?”
Providing clear answers helps the agent proceed correctly.
Working with the Library
Section titled “Working with the Library”Naming Your Sources
Section titled “Naming Your Sources”Give your data sources clear, descriptive names in the Library:
- ✅ “Q4 2024 Sales Report”
- ✅ “Customer Database (Prod)”
- ❌ “data_final_v3”
- ❌ “export_20241201”
Clear names help the agent find the right data faster.
Adding Descriptions
Section titled “Adding Descriptions”Add descriptions to your sources:
- What the data contains
- Date ranges covered
- Any important notes
The agent reads these descriptions when searching for relevant data.
Using Tags
Section titled “Using Tags”Tag related sources:
sales,revenue,quarterlycustomers,crmmarketing,campaigns
Tags improve search and organization.
Common Agent Patterns
Section titled “Common Agent Patterns”Pattern: Explore → Filter → Visualize
Section titled “Pattern: Explore → Filter → Visualize”1. "Load sales data" → Agent loads and previews2. "Filter to California" → Agent creates filtered dataset3. "Create a bar chart by product" → Agent generates visualizationPattern: Investigate → Decide → Create
Section titled “Pattern: Investigate → Decide → Create”1. "What's in the customer data?" → Agent examines structure2. "Show me customer types" → Agent investigates values3. "Create a pie chart of customer distribution" → Agent builds chartPattern: Compare Multiple Sources
Section titled “Pattern: Compare Multiple Sources”1. "Load sales and costs data" → Agent loads both sources2. "Join them on product_id" → Agent creates joined dataset3. "Calculate profit margin" → Agent adds calculated column4. "Show top 10 products by margin" → Agent creates resultGrounding in Data
Section titled “Grounding in Data”If you ask “What’s the total revenue?” and the agent hasn’t analyzed that yet:
- ❌ Won’t make up a number
- ✅ Will create a step to calculate it from your data
This ensures all insights are grounded in your actual data.
Practice Makes Perfect
Section titled “Practice Makes Perfect”The more you use Querri, the better you’ll get at asking questions that yield great results. Pay attention to which prompts work well and adapt your style accordingly.
Pro Tips:
- Start simple and build complexity through conversation
- Let the agent load data selectively (1-2 sources at a time)
- Review intermediate results before moving to next steps
- Ask the agent to explain what it’s doing if unclear
- Trust the agent’s judgment on data selection and analysis approach
Next Steps
Section titled “Next Steps”- Try these techniques in the chat interface
- Learn about loading data effectively
- Explore analysis capabilities
- Review the Agent Tools Reference to see what’s possible