Using the Add Context Feature in SheetXAI
Overview
The Add Context feature allows you to provide SheetXAI with specific cells, ranges, or entire sheets as reference material for your queries. This powerful capability overcomes the default limitation where SheetXAI only sees the first 5 rows of your data and the header row, enabling more precise and targeted AI assistance.
Platform Availability: This feature works identically in both Google Sheets and Excel versions of SheetXAI.
Why Add Context Is Important
By default, SheetXAI only has visibility of your spreadsheet's header row and first 5 rows of data. While this is sufficient for most operations, there are several scenarios where adding context becomes essential:
- When asking about data beyond row 5
- When working with spreadsheets that have unique patterns or structures
- When referencing specific cells deep within your data (e.g., line 57)
- When performing operations across multiple sheets
- When you want the AI to understand the full scope of your data
Important Note: SheetXAI can perform almost all standard operations using just the first 5 rows. You should only add context when specifically needed, and avoid adding more than 50 cells to context at once for optimal performance.
How to Use Add Context
Method 1: Cell Selection
-
Select Relevant Cells
- Click on individual cells or drag to select ranges that contain information you want the AI to reference
- Limit your selection to no more than 50 cells for best results
- You can select non-contiguous ranges by holding Ctrl (or Cmd on Mac) while selecting multiple areas
-
Click the Add Context Button
- After selecting your cells, click the Add Context button in the SheetXAI sidebar
- This step is essential - simply selecting cells without clicking the button will not add them to context
- Selected cells will be highlighted to show they've been added as context
-
Verify Added Context
- The selected content will appear in the context area of the SheetXAI sidebar
- You'll see a preview of the cell references that have been added
-
Ask Your Question
- With your context added, type your question in the chat box
- Your question can now reference the specific data you've selected
- Example: "What's the average value in the cells I selected?" or "Summarize the trends in this range"
Method 2: Sheet Reference Command
-
Use the @Sheet Command
- In the SheetXAI chat, type
@
followed by the sheet name - Example:
@January Sales
or@Q1 Data
- This adds the sheet structure to context, not the entire sheet data
- SheetXAI will grab enough information about the sheet to understand its structure and perform most operations
- In the SheetXAI chat, type
-
Combine with Your Question
- After adding the sheet reference, ask your question
- Example:
@Inventory Sheet What's the total value of items with less than 10 units in stock?
When to Use Add Context (And When Not To)
Use Add Context When:
- You need information about specific rows beyond row 5
- You're comparing data points from different parts of the sheet
- Your spreadsheet has unique structures or patterns not visible in the first 5 rows
- You need to perform operations across multiple sheets
Don't Use Add Context When:
- Your operation involves standard formatting across the entire sheet
- You're working with data that follows the same pattern shown in the first 5 rows
- You're performing sorting, filtering, or column operations
- You're creating formulas that should apply to the entire dataset
Use Cases for Add Context
Deep Data Analysis
Scenario: You need information about a specific transaction on row 57.
Solution: Select row 57, click Add Context, then ask "What's the status of this transaction?"
Pattern Recognition
Scenario: Your spreadsheet contains financial data with seasonal patterns that aren't evident in just the first few rows.
Solution: Select a representative sample (not the entire dataset) - perhaps 30-40 cells from key periods, click Add Context, then ask "What seasonal patterns do you see in this data?"
Multi-Sheet Operations
Scenario: You need to compare data between your "2022 Sales" and "2023 Sales" sheets.
Solution: Type @2022 Sales @2023 Sales Compare the quarterly performance between these two years
Complex Queries
Scenario: You need to understand outliers in a large dataset.
Solution: Select a few known outliers plus some normal data points for context (staying under 50 cells), click Add Context, then ask "Why might these values be outliers compared to the normal range?"
Pro Tips
-
Be Minimal: Only add the absolute minimum context needed - typically 5-20 cells is sufficient for most operations
-
Clear Context When Done: After completing your specific query, click the Clear chat option to ensure optimal performance
-
Targeted Selection: Instead of selecting entire rows or columns, select only the specific cells relevant to your query
-
Strategic Sampling: For large datasets with patterns, select small samples from different sections rather than contiguous blocks
-
Show Context First: If unsure whether the right context is being captured, ask SheetXAI "What context do I currently have selected?" before proceeding with your main question
Common Issues
Problem: Context Not Appearing in Sidebar
Solution:
- Make sure you click the Add Context button after selecting your cells
- Simply selecting cells without clicking the button will not add them to context
- Verify that your selection is highlighted and appears in the context area of the sidebar