TextQL’s context editor is your central hub for creating and managing all context documents. It provides a user-friendly interface for writing context, uploading files, and organizing your organization’s knowledge base.
Access the Context Editor: Navigate to the Context page from the left sidebar in your TextQL workspace.
Click the + (plus) button in the Context Library to open the create context dialog.
Create context dialog
2
Give It a Name
Give your context document a descriptive name that clearly indicates its purpose, like “LinkedIn Analytics Warehouse” or “Sales Team Best Practices”.
3
Set the Scope
Choose where this context should apply:Organization Context
Applies to everyone in your organization
Only one organization context document is allowed
If one already exists, this option will be disabled
Roles
Select one or more roles that should see this context
Users must have the selected role to access this context
Connectors
Select one or more data connectors
Context applies when users are actively chatting with the selected connector
Role + Connector Combination
Select both roles AND connectors
Context applies only when a user with the specified role queries the specified connector
This is the most targeted form of context scoping
Scoping Strategy: Start broad (organization-level) and add specific context as needed. Learn more in Context Scoping.
4
Write Your Context
Enter your context content in the plain text editor. No special formatting or structure is required — just write naturally. You can also ask Ana to write context for you (see Best Practices below).
5
Attach Datasets (Optional)
Click the + Attach button under “Datasets” to link relevant data files to this context.Attached datasets help Ana understand the structure and content of your data when this context is active.
6
Save Your Context
Click Create Context to save your new context document. It becomes immediately available to users based on your scoping settings.
Click the Edit icon (pencil) next to the document name
Make your changes in the editor
Click Save to update the context
Remember to Save: After making changes, click Save to apply them. Saved changes apply to all new chats immediately. Existing chats may need to be refreshed.
Ana can read and propose changes to your shared context library directly from a chat. Instead of applying edits immediately, Ana uses a review-before-apply workflow so you stay in control of what gets saved.
When you ask Ana to update or create a context document, she reads and writes files in a sandboxed copy of your library. Nothing is changed in the shared library yet.
2
Ana generates a diff for review
Ana calls generate_patch to produce a unified diff of all her edits and displays it in the chat as a fenced code block. You can read exactly what will change before anything is applied.
3
You confirm or discard
The system renders a confirmation prompt — Apply these changes? or Discard? — directly in the chat. You do not need to copy anything or navigate away.
Apply: the patch is uploaded and applied to the shared library immediately.
Discard: the proposed changes are thrown away and the library is unchanged.
Review the diff carefully. Context that is wrong is often worse than no context at all — Ana will confidently apply an incorrect rule to every future conversation. Take a moment to read the proposed changes before confirming.
Click on any context document in the library to view its full content, scope, attached datasets, and status. From there you can edit, pause, or delete the document. Pausing a context document temporarily disables it without deleting it — useful for testing or temporarily removing context without losing your work.
The most effective way to create context is to have Ana write it for you. After a successful chat where Ana performed an action the way you wanted, ask her to turn those instructions into a context document. We’ve found that Ana follows instructions best when she wrote them herself based on a real, successful interaction.Ana will show you a diff of the proposed changes and ask for your confirmation before saving anything to the shared library.
Keep Context Focused
Each context document should have a clear, single purpose. Don’t try to cram everything into one document.Good: “Sales Team Terminology”
Bad: “Everything About Our Company”
Use Descriptive Names
Name context documents so anyone in your organization can understand their purpose at a glance.
Update Regularly
Context should evolve with your organization. Review and update context documents quarterly or when business processes change.
Test Your Context
After creating context, test it by chatting with Ana to ensure she’s interpreting it correctly.