Understand how to apply context at different levels: organization, role, and connector
Understanding Context Scopes
Context scoping determines who sees your context and when they see it. TextQL offers flexible scoping options that let you provide the right context to the right people at the right time.
Key Concept: Context can be scoped to your entire organization, specific roles, specific connectors, or combinations of roles and connectors.
The Three Scoping Dimensions
Context in TextQL operates across three dimensions:
Organization
Context that applies to everyone in your organization, regardless of role or connector.
Role
Context that applies to users with specific assigned roles.
Connector
Context that applies when querying specific data sources.
Organization-Level Context
Organization context is the broadest scope and applies to every user in your organization across all connectors.
When to Use Organization Context
Use organization-level context for:
Company-wide business rules and policies
Universal terminology and definitions
General data interpretation guidelines
Organization-wide best practices
Example Organization Context
# Acme Corp Business Context## Fiscal Calendar- Our fiscal year runs from July 1 to June 30- Q1: July-September, Q2: October-December, Q3: January-March, Q4: April-June## Currency Standards- All financial reporting should be in USD- Use 2 decimal places for currency values## Key Business Rules- Revenue is recognized at time of shipment, not order- Refunds are excluded from revenue calculations
Important Limitation
Only One Organization Context AllowedYou can only have one organization-level context document. If you need to add more organization-wide information, edit your existing organization context rather than creating a new one.
Role-Based Context
Role-based context applies to users who have been assigned specific roles in your organization.
When to Use Role-Based Context
Use role-based context for:
Department-specific terminology or processes
Persona-based customization of Ana’s behavior
Skill-level appropriate guidance
Team-specific best practices
Example Role Contexts
For “Sales Team” Role:
# Sales Team Context## CRM Fields- **Stage**: Current position in sales pipeline- **Close Date**: Expected contract signature date- **ARR**: Annual Recurring Revenue## Reporting Preferences- Focus on pipeline velocity and conversion rates- Always include win/loss analysis
How Roles Work
Roles in TextQL are part of the RBAC (Role-Based Access Control) system. They:
Control access to features like dashboards and playbooks
Enable custom context for different user personas
Are assigned by administrators
Multiple Roles: Users can have multiple roles, and they’ll receive context from all assigned roles.
Connector-Based Context
Connector-based context applies when users are actively querying a specific data source.
When to Use Connector-Based Context
Use connector-based context for:
Database-specific schema information
Data source-specific business logic
Connector-specific query patterns
Data quality notes or caveats
Example Connector Context
For “Salesforce Production” Connector:
# Salesforce Production Database Context## Schema Information- **Account**: Customer organizations- **Opportunity**: Sales deals in pipeline- **Contact**: Individual people at customer organizations## Important Notes- Closed-Won opportunities have Stage = "Closed Won"- Amount field is in USD- Data is synced hourly at :15 past the hour## Common Queries- Pipeline value: SUM(Amount) WHERE Stage != "Closed Lost"- Win rate: COUNT(Closed Won) / COUNT(All Opportunities)
Best Practices for Connector Context
Limit Schema Information
Don’t document your entire schema in context. Focus on:
Non-obvious table relationships
Important business logic in the data
Common query patterns
Ana can discover schema through other means, so context should add business understanding, not just technical details.
Document Data Quirks
Use connector context to highlight:
Known data quality issues
Unusual field meanings
Important filters or exclusions
Role + Connector Intersection
The most targeted form of context applies only when a user with a specific role queries a specific connector.
When to Use Intersection Context
Use role + connector context for:
Highly specialized use cases
Role-specific views of particular data sources
Advanced users who need detailed technical context
Compliance or security-sensitive scenarios
Example Intersection Context
For “Finance Team” Role + “Salesforce Production” Connector:
# Finance Team - Salesforce Context## Revenue Recognition RulesWhen analyzing Salesforce data for financial reporting:- Only include opportunities with Stage = "Closed Won"- Use CloseDate for revenue period assignment- Exclude opportunities with Type = "Internal"## Required FiltersAlways apply these filters for financial reports:- IsDeleted = false- Amount > 0- CloseDate within reporting period
How Intersection Works
For intersection context to apply, both conditions must be true:
The user must have the specified role assigned
The user must be actively chatting with the specified connector
If either condition is false, the context won’t be applied.
Context Priority and Layering
When multiple context documents apply to a user, Ana considers all of them. Context is layered from broadest to most specific:
1
Organization Context
Always applies to every user. This is the foundation layer that everyone sees.
2
Role Context
Applies if the user has the specified role assigned. Adds role-specific information on top of organization context.
3
Connector Context
Applies when the user is actively querying the specified data source. Adds data-specific information.
4
Role + Connector Context
Applies only when both the role and connector match. The most targeted layer for highly specialized needs.
All Applicable Context is Used: Ana doesn’t choose one context over another. She considers all context that applies to the current user and situation.
Scoping Strategy
The best way to build context for a new connector is to let Ana learn it with you:
1
Connect Your Data Source
Set up a new connector in TextQL and start a chat with it.
2
Query Naturally
Ask Ana questions about the data. She’ll explore the schema, run SQL queries, and sometimes fail as she learns the shape of your data — that’s expected.
3
Ask Ana to Write Your Context
Once you’ve had a successful chat, ask Ana: “Can you write me a context document as markdown that I can copy back to your context library?” She’ll produce a well-structured context document based on what she learned.
Asking Ana to generate a context document after exploring a new connector
4
Copy It to the Context Library
Open the Context Library, create a new context document scoped to that connector, and paste in what Ana wrote. Currently, context must be manually copied from the chat — there is no automatic context updating from conversations, except through the GitHub integration.
What’s Next?
Context Editor
Return to the editor guide to create your scoped context documents
GitHub Integration
Manage context documents through version-controlled GitHub repositories
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TextQL Docs","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/textql/9RDmZW4lVU96oHnJ/logo-textql/light.svg?fit=max\u0026auto=format\u0026n=9RDmZW4lVU96oHnJ\u0026q=85\u0026s=069d276e4ee2f256e061f8e2db9860a3","dark":"https://mintcdn.com/textql/9RDmZW4lVU96oHnJ/logo-textql/dark.svg?fit=max\u0026auto=format\u0026n=9RDmZW4lVU96oHnJ\u0026q=85\u0026s=1a728bc3acfd6eda203c49a45eac0355"},"favicon":"https://mintcdn.com/textql/jK3bTwZd_T-GaQ4j/favicon.svg?fit=max\u0026auto=format\u0026n=jK3bTwZd_T-GaQ4j\u0026q=85\u0026s=4f7feffa45a51a795a1b929f05a772bf","api":{"openapi":["api-reference/platform/chat.openapi.yaml","api-reference/platform/playbooks.openapi.yaml","api-reference/platform/agents.openapi.yaml","api-reference/platform/connectors.openapi.yaml","api-reference/platform/api_access_key.openapi.yaml","api-reference/platform/sandbox.openapi.yaml","api-reference/platform/v2.openapi.yaml","api-reference/speakeasy/textql-api-with-code-samples.yaml"],"mdx":{"auth":{"method":"bearer"},"server":"https://app.textql.com"}},"appearance":{"default":"light","strict":false},"navbar":{"links":[{"href":"mailto:support@textql.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.textql.com"}},"footer":{"socials":{"x":"https://x.com/TextQL","github":"https://github.com/textqllabs","linkedin":"https://www.linkedin.com/company/textql"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"textql","hasAudioNarration":false,"actualSubdomain":"textql","customDomains":["docs.textql.com"],"gitSource":{"type":"github","owner":"textqllabs","repo":"demo2","deployBranch":"main","contentDirectory":"docs/public","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af603b7aecf0202e5cba9fa","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"v3 API (SDK)","count":454},{"language":"default","tag":"Workshops","count":202},{"language":"default","tag":"Documentation","count":164},{"language":"default","tag":"Ontology Management Service","count":70},{"language":"default","tag":"v2 API","count":56},{"language":"default","tag":"Set Up Your Data","count":56},{"language":"default","tag":"RBAC Service","count":41},{"language":"default","tag":"Chat Service","count":39},{"language":"default","tag":"Playbook Service","count":39},{"language":"default","tag":"How It Works","count":32}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"table{width:100%;border-collapse:collapse;margin:1rem 0}th,td{border:1px solid #e5e7eb;padding:0.6rem 0.85rem;text-align:left;vertical-align:top;line-height:1.45}th{background:#f9fafb;font-weight:600}th:first-child,td:first-child{white-space:nowrap}.dark th,.dark td{border-color:#2b2b2b}.dark th{background:#18181b}"}],"page":{"pagePath":"core/archived-ontology/context-library/context-scoping","slug":"/core/archived-ontology/context-library/context-scoping","pageMetadata":{"title":"Context Scoping","description":"Understand how to apply context at different levels: organization, role, and connector","icon":"layer-group","href":"/core/archived-ontology/context-library/context-scoping"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand how to apply context at different levels: organization, role, and connector\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`understanding-context-scopes`,children:`Understanding Context Scopes`}),`\n`,_jsxs(_components.p,{children:[`Context scoping determines `,_jsx(_components.strong,{children:`who`}),` sees your context and `,_jsx(_components.strong,{children:`when`}),` they see it. TextQL offers flexible scoping options that let you provide the right context to the right people at the right time.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key Concept:`}),` Context can be scoped to your entire organization, specific roles, specific connectors, or combinations of roles and connectors.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`the-three-scoping-dimensions`,children:`The Three Scoping Dimensions`}),`\n`,_jsx(_components.p,{children:`Context in TextQL operates across three dimensions:`}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`Organization`,icon:`building`,children:_jsx(_components.p,{children:`Context that applies to everyone in your organization, regardless of role or connector.`})}),_jsx(Card,{title:`Role`,icon:`user-tag`,children:_jsx(_components.p,{children:`Context that applies to users with specific assigned roles.`})}),_jsx(Card,{title:`Connector`,icon:`database`,children:_jsx(_components.p,{children:`Context that applies when querying specific data sources.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`organization-level-context`,children:`Organization-Level Context`}),`\n`,_jsxs(_components.p,{children:[`Organization context is the broadest scope and applies to `,_jsx(_components.strong,{children:`every user`}),` in your organization across `,_jsx(_components.strong,{children:`all connectors`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`when-to-use-organization-context`,children:`When to Use Organization Context`}),`\n`,_jsx(_components.p,{children:`Use organization-level context for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Company-wide business rules and policies`}),`\n`,_jsx(_components.li,{children:`Universal terminology and definitions`}),`\n`,_jsx(_components.li,{children:`General data interpretation guidelines`}),`\n`,_jsx(_components.li,{children:`Organization-wide best practices`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-organization-context`,children:`Example Organization Context`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Acme Corp Business Context`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Fiscal Calendar`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Our fiscal year runs from July 1 to June 30`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Q1: July-September, Q2: October-December, Q3: January-March, Q4: April-June`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Currency Standards`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` All financial reporting should be in USD`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use 2 decimal places for currency values`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Key Business Rules`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Revenue is recognized at time of shipment, not order`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Refunds are excluded from revenue calculations`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`important-limitation`,children:`Important Limitation`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Only One Organization Context Allowed`})}),_jsxs(_components.p,{children:[`You can only have `,_jsx(_components.strong,{children:`one`}),` organization-level context document. If you need to add more organization-wide information, edit your existing organization context rather than creating a new one.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`role-based-context`,children:`Role-Based Context`}),`\n`,_jsx(_components.p,{children:`Role-based context applies to users who have been assigned specific roles in your organization.`}),`\n`,_jsx(Heading,{level:`3`,id:`when-to-use-role-based-context`,children:`When to Use Role-Based Context`}),`\n`,_jsx(_components.p,{children:`Use role-based context for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Department-specific terminology or processes`}),`\n`,_jsx(_components.li,{children:`Persona-based customization of Ana’s behavior`}),`\n`,_jsx(_components.li,{children:`Skill-level appropriate guidance`}),`\n`,_jsx(_components.li,{children:`Team-specific best practices`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-role-contexts`,children:`Example Role Contexts`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`For “Sales Team” Role:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Sales Team Context`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## CRM Fields`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **Stage**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Current position in sales pipeline`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **Close Date**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Expected contract signature date`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **ARR**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Annual Recurring Revenue`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Reporting Preferences`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Focus on pipeline velocity and conversion rates`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Always include win/loss analysis`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`how-roles-work`,children:`How Roles Work`}),`\n`,_jsx(_components.p,{children:`Roles in TextQL are part of the RBAC (Role-Based Access Control) system. They:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Control access to features like dashboards and playbooks`}),`\n`,_jsx(_components.li,{children:`Enable custom context for different user personas`}),`\n`,_jsx(_components.li,{children:`Are assigned by administrators`}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Multiple Roles:`}),` Users can have multiple roles, and they’ll receive context from all assigned roles.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`connector-based-context`,children:`Connector-Based Context`}),`\n`,_jsx(_components.p,{children:`Connector-based context applies when users are actively querying a specific data source.`}),`\n`,_jsx(Heading,{level:`3`,id:`when-to-use-connector-based-context`,children:`When to Use Connector-Based Context`}),`\n`,_jsx(_components.p,{children:`Use connector-based context for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Database-specific schema information`}),`\n`,_jsx(_components.li,{children:`Data source-specific business logic`}),`\n`,_jsx(_components.li,{children:`Connector-specific query patterns`}),`\n`,_jsx(_components.li,{children:`Data quality notes or caveats`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-connector-context`,children:`Example Connector Context`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`For “Salesforce Production” Connector:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Salesforce Production Database Context`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Schema Information`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **Account**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Customer organizations`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **Opportunity**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Sales deals in pipeline`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:` **Contact**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Individual people at customer organizations`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Important Notes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Closed-Won opportunities have Stage = \"Closed Won\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Amount field is in USD`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Data is synced hourly at :15 past the hour`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Common Queries`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Pipeline value: SUM(Amount) WHERE Stage != \"Closed Lost\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Win rate: COUNT(Closed Won) / COUNT(All Opportunities)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`best-practices-for-connector-context`,children:`Best Practices for Connector Context`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Limit Schema Information`,id:`limit-schema-information`,children:[_jsx(_components.p,{children:`Don’t document your entire schema in context. Focus on:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Non-obvious table relationships`}),`\n`,_jsx(_components.li,{children:`Important business logic in the data`}),`\n`,_jsx(_components.li,{children:`Common query patterns`}),`\n`]}),_jsx(_components.p,{children:`Ana can discover schema through other means, so context should add business understanding, not just technical details.`})]}),_jsxs(Accordion,{title:`Document Data Quirks`,id:`document-data-quirks`,children:[_jsx(_components.p,{children:`Use connector context to highlight:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Known data quality issues`}),`\n`,_jsx(_components.li,{children:`Unusual field meanings`}),`\n`,_jsx(_components.li,{children:`Important filters or exclusions`}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`role-+-connector-intersection`,children:`Role + Connector Intersection`}),`\n`,_jsxs(_components.p,{children:[`The most targeted form of context applies only when a user with a `,_jsx(_components.strong,{children:`specific role`}),` queries a `,_jsx(_components.strong,{children:`specific connector`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`when-to-use-intersection-context`,children:`When to Use Intersection Context`}),`\n`,_jsx(_components.p,{children:`Use role + connector context for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Highly specialized use cases`}),`\n`,_jsx(_components.li,{children:`Role-specific views of particular data sources`}),`\n`,_jsx(_components.li,{children:`Advanced users who need detailed technical context`}),`\n`,_jsx(_components.li,{children:`Compliance or security-sensitive scenarios`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-intersection-context`,children:`Example Intersection Context`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`For “Finance Team” Role + “Salesforce Production” Connector:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Finance Team - Salesforce Context`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Revenue Recognition Rules`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`When analyzing Salesforce data for financial reporting:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Only include opportunities with Stage = \"Closed Won\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use CloseDate for revenue period assignment`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Exclude opportunities with Type = \"Internal\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Required Filters`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Always apply these filters for financial reports:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` IsDeleted = false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Amount > 0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CloseDate within reporting period`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`how-intersection-works`,children:`How Intersection Works`}),`\n`,_jsxs(_components.p,{children:[`For intersection context to apply, `,_jsx(_components.strong,{children:`both conditions must be true`}),`:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`The user must have the specified role assigned`}),`\n`,_jsx(_components.li,{children:`The user must be actively chatting with the specified connector`}),`\n`]}),`\n`,_jsx(_components.p,{children:`If either condition is false, the context won’t be applied.`}),`\n`,_jsx(Heading,{level:`2`,id:`context-priority-and-layering`,children:`Context Priority and Layering`}),`\n`,_jsx(_components.p,{children:`When multiple context documents apply to a user, Ana considers all of them. Context is layered from broadest to most specific:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Organization Context`,children:_jsx(_components.p,{children:`Always applies to every user. This is the foundation layer that everyone sees.`})}),_jsx(Step,{title:`Role Context`,children:_jsx(_components.p,{children:`Applies if the user has the specified role assigned. Adds role-specific information on top of organization context.`})}),_jsx(Step,{title:`Connector Context`,children:_jsx(_components.p,{children:`Applies when the user is actively querying the specified data source. Adds data-specific information.`})}),_jsx(Step,{title:`Role + Connector Context`,children:_jsx(_components.p,{children:`Applies only when both the role and connector match. The most targeted layer for highly specialized needs.`})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`All Applicable Context is Used:`}),` Ana doesn’t choose one context over another. She considers all context that applies to the current user and situation.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`scoping-strategy`,children:`Scoping Strategy`}),`\n`,_jsx(_components.p,{children:`The best way to build context for a new connector is to let Ana learn it with you:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Connect Your Data Source`,children:_jsx(_components.p,{children:`Set up a new connector in TextQL and start a chat with it.`})}),_jsx(Step,{title:`Query Naturally`,children:_jsx(_components.p,{children:`Ask Ana questions about the data. She’ll explore the schema, run SQL queries, and sometimes fail as she learns the shape of your data — that’s expected.`})}),_jsxs(Step,{title:`Ask Ana to Write Your Context`,children:[_jsx(_components.p,{children:`Once you’ve had a successful chat, ask Ana: “Can you write me a context document as markdown that I can copy back to your context library?” She’ll produce a well-structured context document based on what she learned.`}),_jsx(Frame,{caption:`Asking Ana to generate a context document after exploring a new connector`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=98bec2035bfa56c5fe823b6730d20d84`,alt:`Chat showing Ana writing context`,\"data-og-width\":`1723`,width:`1723`,\"data-og-height\":`954`,height:`954`,\"data-path\":`images/guides/context/ana-writes-context.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=280\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=f06fc795c8c117b2619b0147555b5309 280w, https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=560\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=6620e6a3000b417fbb6d69ac558c60cf 560w, https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=840\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=26b55d4b1492ad9bf33746d10a810569 840w, https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=1100\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=293aeec56b4dfc7ef3eda3f8a4e6e521 1100w, https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=1650\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=13782fef946dc4c2f486112a9f7f5af9 1650w, https://mintcdn.com/textql/3ytic9CFBeCFPnQA/images/guides/context/ana-writes-context.png?w=2500\u0026fit=max\u0026auto=format\u0026n=3ytic9CFBeCFPnQA\u0026q=85\u0026s=e5ff2608789128129d3365d89fa0e409 2500w`})})]}),_jsx(Step,{title:`Copy It to the Context Library`,children:_jsxs(_components.p,{children:[`Open the Context Library, create a new context document scoped to that connector, and paste in what Ana wrote. Currently, context must be manually copied from the chat — there is no automatic context updating from conversations, except through the `,_jsx(_components.a,{href:`/core/guides/context/github-integration`,children:`GitHub integration`}),`.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`what’s-next`,children:`What’s Next?`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Context Editor`,icon:`pen-to-square`,href:`/core/guides/context/context-editor`,children:_jsx(_components.p,{children:`Return to the editor guide to create your scoped context documents`})}),_jsx(Card,{title:`GitHub Integration`,icon:`github`,href:`/core/guides/context/github-integration`,children:_jsx(_components.p,{children:`Manage context documents through version-controlled GitHub repositories`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Context Scoping","description":"Understand how to apply context at different levels: organization, role, and connector","icon":"layer-group","href":"/core/archived-ontology/context-library/context-scoping"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Understanding Context Scopes","slug":"understanding-context-scopes","depth":2,"children":[]},{"title":"The Three Scoping Dimensions","slug":"the-three-scoping-dimensions","depth":2,"children":[]},{"title":"Organization-Level Context","slug":"organization-level-context","depth":2,"children":[{"title":"When to Use Organization Context","slug":"when-to-use-organization-context","depth":3,"children":[]},{"title":"Example Organization Context","slug":"example-organization-context","depth":3,"children":[]},{"title":"Important Limitation","slug":"important-limitation","depth":3,"children":[]}]},{"title":"Role-Based Context","slug":"role-based-context","depth":2,"children":[{"title":"When to Use Role-Based Context","slug":"when-to-use-role-based-context","depth":3,"children":[]},{"title":"Example Role Contexts","slug":"example-role-contexts","depth":3,"children":[]},{"title":"How Roles Work","slug":"how-roles-work","depth":3,"children":[]}]},{"title":"Connector-Based Context","slug":"connector-based-context","depth":2,"children":[{"title":"When to Use Connector-Based Context","slug":"when-to-use-connector-based-context","depth":3,"children":[]},{"title":"Example Connector Context","slug":"example-connector-context","depth":3,"children":[]},{"title":"Best Practices for Connector Context","slug":"best-practices-for-connector-context","depth":3,"children":[]}]},{"title":"Role + Connector Intersection","slug":"role-+-connector-intersection","depth":2,"children":[{"title":"When to Use Intersection Context","slug":"when-to-use-intersection-context","depth":3,"children":[]},{"title":"Example Intersection Context","slug":"example-intersection-context","depth":3,"children":[]},{"title":"How Intersection Works","slug":"how-intersection-works","depth":3,"children":[]}]},{"title":"Context Priority and Layering","slug":"context-priority-and-layering","depth":2,"children":[]},{"title":"Scoping Strategy","slug":"scoping-strategy","depth":2,"children":[]},{"title":"What’s Next?","slug":"what’s-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"textql","siteName":"TextQL Docs","title":"Context Scoping - TextQL Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-21T14:31:03.307Z","originalFileLocation":"core/archived-ontology/context-library/context-scoping.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand how to apply context at different levels: organization, role, and connector\">\u003cmeta data-mint-head name=\"application-name\" content=\"TextQL Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Context Scoping - TextQL Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand how to apply context at different levels: organization, role, and connector\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TextQL Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://textql.mintlify.site/_mintlify/api/og/v2?division=Getting+Started+with+Context\u0026amp;title=Context+Scoping\u0026amp;description=Understand+how+to+apply+context+at+different+levels%3A+organization%2C+role%2C+and+connector\u0026amp;theme=27d2effcabcfba3c2216aacf\u0026amp;signature=8ab9fbb67ee8c5b9a84987b326d93656781ff8237d882443ca444100e33b8ed8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Context Scoping - TextQL Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand how to apply context at different levels: organization, role, and connector\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://textql.mintlify.site/_mintlify/api/og/v2?division=Getting+Started+with+Context\u0026amp;title=Context+Scoping\u0026amp;description=Understand+how+to+apply+context+at+different+levels%3A+organization%2C+role%2C+and+connector\u0026amp;theme=27d2effcabcfba3c2216aacf\u0026amp;signature=8ab9fbb67ee8c5b9a84987b326d93656781ff8237d882443ca444100e33b8ed8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/textql/UPDKEixAE9_oDjsV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TextQL Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/core/archived-ontology/context-library/context-scoping.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.textql.com/#organization\",\"name\":\"TextQL Docs\",\"url\":\"https://docs.textql.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/textql/9RDmZW4lVU96oHnJ/logo-textql/light.svg?fit=max\u0026auto=format\u0026n=9RDmZW4lVU96oHnJ\u0026q=85\u0026s=069d276e4ee2f256e061f8e2db9860a3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.textql.com#website\",\"name\":\"TextQL Docs\",\"url\":\"https://docs.textql.com\",\"publisher\":{\"@id\":\"https://docs.textql.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping#webpage\",\"url\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping\",\"name\":\"Context Scoping\",\"description\":\"Understand how to apply context at different levels: organization, role, and connector\",\"dateModified\":\"2026-05-21T14:31:03.307Z\",\"isPartOf\":{\"@id\":\"https://docs.textql.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TextQL Docs\",\"item\":\"https://docs.textql.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Context Scoping\",\"item\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping#article\",\"headline\":\"Context Scoping\",\"name\":\"Context Scoping\",\"description\":\"Understand how to apply context at different levels: organization, role, and connector\",\"url\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping\",\"mainEntityOfPage\":{\"@id\":\"https://docs.textql.com/core/archived-ontology/context-library/context-scoping#webpage\"},\"dateModified\":\"2026-05-21T14:31:03.307Z\",\"publisher\":{\"@id\":\"https://docs.textql.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.textql.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TextQL Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TextQL Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/core/archived-ontology/context-library/context-scoping.md","siteName":"TextQL Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"What is TextQL","sidebarTitle":"Introduction","icon":"rocket","href":"/core/get-started/quickstart"},{"title":"Connect Your Data","icon":"database","href":"/core/get-started/connect-your-data"},{"title":"Example Connectors","icon":"flask","href":"/core/get-started/sample-data"},{"title":"Your First Chat","icon":"comment-dots","href":"/core/get-started/your-first-chat"}]},{"group":"How It Works","pages":[{"title":"Threads — Chat with Ana","sidebarTitle":"Threads","icon":"robot","href":"/core/how-it-works/ana/overview"},{"group":"Playbooks","icon":"play","pages":[{"title":"Build Playbooks Directly in Threads","icon":"play","href":"/core/how-it-works/playbooks/build-from-threads"},{"title":"Overview","icon":"play","href":"/core/how-it-works/playbooks"},{"title":"Slack Integration","icon":"play","href":"/core/how-it-works/playbooks/slack-integration"},{"title":"Teams Integration","icon":"microsoft","href":"/core/how-it-works/playbooks/teams-integration"},{"title":"Templates","icon":"play","href":"/core/how-it-works/playbooks/templates"},{"title":"Your First Playbook","icon":"play","href":"/core/how-it-works/playbooks/your-first-playbook"}]},{"group":"Tools","icon":"wrench","pages":[{"title":"Overview","sidebarTitle":"Overview","icon":"wrench","href":"/core/how-it-works/tools"},{"title":"Text to SQL","sidebarTitle":"Text to SQL","icon":"wrench","href":"/core/how-it-works/tools/text-to-sql"},{"title":"TQL Query","icon":"brackets-curly","href":"/core/how-it-works/tools/tql-query"},{"title":"Ana Forms","sidebarTitle":"Ana Forms","icon":"wrench","href":"/core/how-it-works/tools/ana-forms"},{"title":"Web Search","sidebarTitle":"Web Search","icon":"wrench","href":"/core/how-it-works/tools/web-search"},{"title":"Thread History Search","icon":"magnifying-glass","href":"/core/how-it-works/tools/thread-search"},{"title":"Platform API Tools","sidebarTitle":"Platform API Tools","icon":"plug","href":"/core/how-it-works/tools/platform-api"},{"title":"File Upload","sidebarTitle":"File Upload","icon":"paperclip","href":"/core/how-it-works/tools/file-upload"},{"title":"Voice Input","sidebarTitle":"Voice Input","icon":"microphone","href":"/core/how-it-works/tools/voice-input"},{"title":"Decide","sidebarTitle":"Decide","icon":"scale-balanced","href":"/core/how-it-works/tools/decide"}]},{"group":"Data Apps","icon":"window-restore","pages":[{"title":"Data Apps","icon":"window-restore","href":"/core/how-it-works/data-apps"},{"title":"The ana.* Functions","icon":"code","href":"/core/how-it-works/data-apps/ana-functions"},{"title":"Row-Level Security","icon":"shield-halved","href":"/core/how-it-works/data-apps/row-level-security"}]},{"title":"Dashboards","icon":"chart-mixed","href":"/core/how-it-works/dashboards"},{"title":"Artifacts","icon":"folder-open","href":"/core/how-it-works/artifacts"},{"title":"Citations","sidebarTitle":"Citations","icon":"quote-right","href":"/core/how-it-works/citations"},{"title":"Subagents","sidebarTitle":"Subagents","icon":"sitemap","href":"/core/how-it-works/ana/subagents"},{"title":"Agent Harnesses","sidebarTitle":"Agent Harnesses","icon":"robot","href":"/core/how-it-works/ana/harnesses"},{"group":"Feed","icon":"rss","pages":[{"title":"Agents","sidebarTitle":"Agents","icon":"robot","href":"/core/how-it-works/feed/agents"},{"title":"Build your first feed agent","sidebarTitle":"Build your first feed agent","icon":"rocket","href":"/core/how-it-works/feed/quickstart"},{"title":"Feed Overview","sidebarTitle":"Overview","icon":"rss","href":"/core/how-it-works/feed"},{"title":"Feeds and channels","sidebarTitle":"Feeds and channels","icon":"rss","href":"/core/how-it-works/feed/feeds-and-channels"},{"group":"Triggers","icon":"bolt","pages":[{"title":"Slack triggers","sidebarTitle":"Slack triggers","icon":"slack","href":"/core/how-it-works/feed/triggers/slack-triggers"}]}]},{"title":"CLI","icon":"terminal","href":"/core/admin/cli"},{"title":"Running an Agent Loop on Sandcastles","icon":"robot","href":"/core/guides/agent-loop-sandcastles"}]},{"group":"Set Up Your Data","pages":[{"title":"The Connectors Page","icon":"down-left-and-up-right-to-center","href":"/core/datasources/the-connectors-page"},{"group":"APIs","icon":"key","pages":[{"title":"Overview","icon":"globe","href":"/core/datasources/api-connectors"},{"title":"Anthropic API Connector","icon":"robot","href":"/core/datasources/apis/anthropic"},{"title":"Apollo.io Connector","icon":"address-book","href":"/core/datasources/apis/apollo"},{"title":"Attio Connector","icon":"address-book","href":"/core/datasources/apis/attio"},{"title":"AWS Connector","icon":"aws","href":"/core/datasources/apis/aws"},{"title":"Microsoft Azure Connector","icon":"microsoft","href":"/core/datasources/apis/azure"},{"title":"Cloudflare Connector","icon":"cloudflare","href":"/core/datasources/apis/cloudflare"},{"title":"Dropbox Connector","icon":"dropbox","href":"/core/datasources/apis/dropbox"},{"title":"ElevenLabs Connector","icon":"microphone","href":"/core/datasources/apis/elevenlabs"},{"title":"Gemini Connector","icon":"sparkles","href":"/core/datasources/apis/gemini"},{"title":"GitHub Connector","icon":"github","href":"/core/datasources/apis/githubapi"},{"title":"Google Cloud Connector","icon":"cloud","href":"/core/datasources/apis/googlecloud"},{"title":"Google Drive Connector","icon":"google-drive","href":"/core/datasources/google-drive"},{"title":"Google Workspace Connector","icon":"google","href":"/core/datasources/google-workspace"},{"title":"Grain Connector","icon":"video","href":"/core/datasources/apis/grain"},{"title":"HubSpot Connector","icon":"hubspot","href":"/core/datasources/apis/hubspot"},{"title":"Jira Connector","icon":"jira","href":"/core/datasources/apis/jira"},{"title":"Linear Connector","icon":"linear","href":"/core/datasources/apis/linear"},{"title":"Mercury Connector","icon":"building-columns","href":"/core/datasources/apis/mercury"},{"title":"Microsoft 365 Connector","icon":"microsoft","href":"/core/datasources/microsoft/microsoft365"},{"title":"Notion Connector","icon":"book","href":"/core/datasources/apis/notion"},{"title":"OpenAI API Connector","icon":"openai","href":"/core/datasources/apis/openai"},{"title":"Oracle Fusion Connector","icon":"cloud","href":"/core/datasources/apis/oracle"},{"title":"PowerBI Connector","icon":"chart-simple","href":"/core/datasources/business-intel/powerbi-connector"},{"title":"Pylon Connector","icon":"headset","href":"/core/datasources/apis/pylon"},{"title":"Ramp Connector","icon":"credit-card","href":"/core/datasources/apis/ramp"},{"title":"Salesforce Connector","icon":"salesforce","href":"/core/datasources/apis/salesforce"},{"title":"SendGrid Connector","icon":"envelope","href":"/core/datasources/apis/sendgrid"},{"title":"Slack API Connector","icon":"slack","href":"/core/datasources/apis/slackapi"},{"title":"Tableau Connector","icon":"t","href":"/core/datasources/business-intel/tableau-connector"},{"title":"YouTube Analytics","icon":"youtube","href":"/core/datasources/youtube"}]},{"group":"Databases","icon":"database","pages":[{"title":"Amazon Aurora Connector","icon":"aws","href":"/core/datasources/databases/aurora"},{"title":"AWS Athena Connector","icon":"aws","href":"/core/datasources/databases/athena"},{"title":"Azure Synapse Analytics Connector","icon":"microsoft","href":"/core/datasources/databases/azure-synapse"},{"title":"BigQuery Connector","icon":"google","href":"/core/datasources/databases/bigquery"},{"title":"ClickHouse Connector","icon":"chart-line","href":"/core/datasources/databases/clickhouse"},{"title":"Databricks Connector","icon":"table","href":"/core/datasources/databases/databricks"},{"title":"Dremio Connector","icon":"database","href":"/core/datasources/databases/dremio"},{"title":"Exasol Connector","icon":"database","href":"/core/datasources/databases/exasol"},{"title":"IBM Db2","icon":"database","href":"/core/datasources/databases/db2"},{"title":"Firebolt Connector","icon":"fire","href":"/core/datasources/databases/firebolt"},{"title":"kdb+ Connector","icon":"database","href":"/core/datasources/databases/kdb"},{"title":"MongoDB Connector","icon":"database","href":"/core/datasources/databases/mongodb"},{"title":"MySQL Connector","icon":"database","href":"/core/datasources/databases/mysql"},{"title":"Network Configuration","icon":"network-wired","href":"/core/datasources/databases/network-configuration"},{"title":"Per-Member Authentication","icon":"users","href":"/core/datasources/per-member-auth"},{"title":"PostgreSQL Connector","icon":"database","href":"/core/datasources/databases/postgresql"},{"title":"Prometheus Connector","icon":"chart-line","href":"/core/datasources/databases/prometheus"},{"title":"Redshift Connector","icon":"aws","href":"/core/datasources/databases/redshift"},{"title":"SAP HANA Connector","icon":"database","href":"/core/datasources/databases/sap-hana"},{"title":"Snowflake Connector","icon":"snowflake","href":"/core/datasources/databases/snowflake"},{"title":"Supabase Connector","icon":"bolt","href":"/core/datasources/databases/supabase"},{"title":"Trino Connector","icon":"triangle","href":"/core/datasources/databases/trino"}]},{"group":"MCP Servers","icon":"plug","pages":[{"title":"MCP Reference","sidebarTitle":"Reference","icon":"book","href":"/core/how-it-works/mcp/reference"},{"title":"MCP Tools: Getting Started","sidebarTitle":"Getting Started","icon":"rocket","href":"/core/how-it-works/mcp/getting-started"}]}]},{"group":"Integrations","pages":[{"group":"Desktop App","icon":"desktop","pages":[{"title":"Desktop App","icon":"desktop","href":"/core/integrations/desktop-app"},{"title":"Desktop App Rollout","icon":"desktop-arrow-down","href":"/core/admin/desktop-app"}]},{"group":"Embedding TextQL","icon":"code","pages":[{"title":"Embedding Chat","icon":"window-restore","href":"/core/guides/embedding-ana"},{"title":"Embedding Dashboards","icon":"chart-mixed","href":"/core/guides/embedding-dashboards"},{"title":"Embedding Data Apps","icon":"window-restore","href":"/core/guides/embedding-data-apps"}]},{"title":"MS Teams","icon":"microsoft","href":"/core/integrations/teams"},{"title":"Slack","icon":"slack","href":"/core/integrations/slack"}]},{"group":"Ontology","pages":[{"group":"Build Your Ontology","icon":"hammer","pages":[{"title":"Build Your Ontology: Quickstart","sidebarTitle":"Quickstart","icon":"hammer","href":"/core/ontology/build-your-ontology"},{"title":".tql Manual","icon":"code","href":"/core/ontology/tql-reference"}]},{"title":"Skills","icon":"wand-magic-sparkles","href":"/core/ontology/skills"},{"group":"Config Files","icon":"file-code","tag":"Beta","pages":[{"title":"Config Files","sidebarTitle":"Config Files","icon":"file-code","href":"/core/ontology/config-files"},{"title":"Config File Reference","sidebarTitle":"Config File Reference","icon":"code","href":"/core/ontology/config-file-reference"}]},{"title":"Branches","sidebarTitle":"Branches","icon":"code-branch","href":"/core/ontology/branches"},{"title":"Role \u0026 Access","icon":"lock","href":"/core/ontology/ontology-rbac"},{"title":"What is Ontology?","icon":"book-open","href":"/core/ontology/overview"}]},{"group":"Get Better Results","pages":[{"title":"How Ana Thinks","icon":"brain","href":"/core/get-better-results/how-ana-thinks"},{"title":"Interactive HTML Reports","icon":"file-code","href":"/core/guides/interactive-html-reports"},{"title":"Validating and Improving Ana's Answers","sidebarTitle":"Validating Ana's Answers","icon":"circle-check","href":"/core/get-better-results/validating-answers"},{"title":"Writing Better Playbook Prompts","sidebarTitle":"Constructing Better Playbooks","icon":"calendar-check","href":"/core/get-better-results/constructing-better-playbooks"},{"title":"Writing Better Prompts","icon":"pen-to-square","href":"/core/get-better-results/writing-better-prompts"}]},{"group":"Admin \u0026 Security","pages":[{"group":"Settings","icon":"gear","pages":[{"title":"Settings Overview","icon":"gear","href":"/core/admin/settings"},{"title":"API Keys","icon":"key","href":"/core/admin/api-keys"},{"title":"Workload Identity Federation","icon":"id-badge","href":"/core/admin/workload-identity"}]},{"title":"Audit Log","icon":"clipboard-list","href":"/core/admin/audit-log"},{"group":"Compliance","icon":"user-shield","pages":[{"title":"Network Configuration","sidebarTitle":"Network Configuration","icon":"shield-halved","href":"/core/admin/compliance/network-configuration"},{"title":"Network Integration Options","sidebarTitle":"Network Integration","icon":"network-wired","href":"/core/admin/compliance/network-integration"},{"title":"TextQL Deployment Types","sidebarTitle":"Deployment Types","icon":"rocket","href":"/core/admin/compliance/deployment-types"},{"title":"TextQL Inference Options","sidebarTitle":"Model Options","icon":"robot","href":"/core/admin/compliance/inference-options"},{"title":"TextQL Security and Data Governance Whitepaper","sidebarTitle":"Data Governance","icon":"gavel","href":"/core/admin/compliance/security"},{"title":"TextQL-Agent (web requests)","icon":"robot","href":"/bot"}]},{"group":"Console","icon":"desktop","pages":[{"title":"Usage","icon":"chart-column","href":"/core/admin/console/usage"},{"title":"Organization Limits","icon":"database","href":"/core/admin/limits"},{"title":"Chargeback","icon":"sitemap","href":"/core/admin/console/chargeback"}]},{"title":"Deployment Configuration","icon":"gear","href":"/core/admin/deployment-config"},{"title":"Manage Workspaces","icon":"building","href":"/core/admin/manage-workspaces"},{"title":"Model Management","icon":"microchip-ai","href":"/core/admin/models"},{"group":"Observability","icon":"shield-check","pages":[{"title":"Audit Logs and Metrics via OpenTelemetry","sidebarTitle":"OpenTelemetry Export","icon":"arrow-up-from-bracket","href":"/core/admin/observability-export"},{"title":"Observability","icon":"shield-check","href":"/core/admin/observability"},{"title":"Evaluations","icon":"clipboard-check","href":"/core/admin/evaluations"}]},{"title":"Role-Based Access Control (RBAC)","icon":"user-shield","href":"/core/admin/rbac"},{"title":"SCIM Provisioning","icon":"users-gear","href":"/core/admin/scim"},{"group":"Single Sign-On (SSO)","icon":"lock","pages":[{"title":"Okta","icon":"key","href":"/core/admin/sso-okta"},{"title":"Single Sign-On (SSO)","icon":"lock","href":"/core/admin/sso"}]},{"title":"TextQL Pricing and Consumption Table","icon":"circle-question","href":"/core/admin/pricing"},{"group":"Usage \u0026 Billing APIs","icon":"chart-bar","pages":[{"title":"Get Usage via API","icon":"chart-bar","href":"/core/admin/usage-api"},{"title":"BYOK Token Usage","icon":"chart-bar","href":"/core/admin/token-usage-api"}]}]},{"group":"FAQ","pages":[{"title":"Chat Error Messages (Advanced)","icon":"triangle-exclamation","href":"/core/how-it-works/chat-errors"},{"title":"Frequently Asked Questions","icon":"circle-question","href":"/core/how-it-works/faq"},{"title":"Get Help","sidebarTitle":"Get Help","icon":"headset","href":"/core/get-started/customer-support"},{"title":"Send Us a HAR File","sidebarTitle":"HAR Files","description":"How to record and safely share a network trace so we can debug loading, timeout, and network errors.","icon":"network-wired","href":"/core/get-started/har-file"}]},{"group":"Legacy Features","pages":[{"group":"Getting Started with Context","icon":"book","pages":[{"title":"Context Scoping","icon":"layer-group","href":"/core/archived-ontology/context-library/context-scoping"},{"title":"Dynamic Context Loading","description":"How Ana navigates your GitHub repository to fetch only the files relevant to each question — not a static snapshot, but a live read at query time.","icon":"bolt","href":"/core/archived-ontology/context-library/github-dynamic-loading"},{"title":"GitHub Integration for Context","icon":"github","href":"/core/archived-ontology/context-library/github-integration"},{"title":"Using the Context Editor","icon":"pen-to-square","href":"/core/archived-ontology/context-library/context-editor"},{"title":"Version-Controlled Context Writing","icon":"code-branch","href":"/core/archived-ontology/context-library/github-version-control"},{"title":"What is Context?","icon":"book-open","href":"/core/archived-ontology/context-library/what-is-context"}]},{"group":"Getting Started with Ontology","icon":"sitemap","pages":[{"title":"What is Ontology?","icon":"book-open","href":"/core/archived-ontology/ontology-guide/what-is-ontology"},{"title":"Building Your First Ontology","icon":"hammer","href":"/core/archived-ontology/ontology-guide/building-your-first-ontology"},{"title":"Core Concepts Explained","icon":"cubes","href":"/core/archived-ontology/ontology-guide/core-concepts"},{"title":"Quick Start Ontology","icon":"bolt","href":"/core/archived-ontology/ontology-guide/quick-start-ontology"},{"title":"Sample Conglomerate Ontology","icon":"database","href":"/core/archived-ontology/ontology-guide/sample-conglomerate-ontology"},{"title":"Why Use Ontology?","icon":"lightbulb","href":"/core/archived-ontology/ontology-guide/why-use-ontology"}]},{"group":"Ontology","icon":"diagram-project","pages":[{"title":"Ontology Overview","sidebarTitle":"Overview","icon":"chalkboard-user","href":"/core/archived-ontology/ontology-how-it-works/overview"},{"title":"BI Dashboards","icon":"chart-line","href":"/core/archived-ontology/ontology-how-it-works/dashboards"},{"title":"Files and Spreadsheets","icon":"file-csv","href":"/core/archived-ontology/ontology-how-it-works/files"},{"title":"Known Missing Features","icon":"bug","href":"/core/archived-ontology/ontology-how-it-works/missing"},{"title":"Metrics","icon":"ruler","href":"/core/archived-ontology/ontology-how-it-works/metrics"},{"title":"Object Links","icon":"code-branch","href":"/core/archived-ontology/ontology-how-it-works/links"},{"title":"Objects","icon":"cube","href":"/core/archived-ontology/ontology-how-it-works/objects"},{"title":"Queries","icon":"person-circle-question","href":"/core/archived-ontology/ontology-how-it-works/queries"},{"title":"TQL Language Reference","sidebarTitle":"TQL Reference","icon":"code","href":"/core/archived-ontology/ontology-how-it-works/tql-reference"},{"title":"Why Ontology? (Advanced)","icon":"diagram-project","href":"/core/archived-ontology/ontology-how-it-works/why"}]}]}]},{"tab":"Workshops","pages":[{"title":"Workshops","href":"/workshops"}]},{"tab":"v1 API (deprecated)","pages":[{"title":"v1 API (deprecated)","href":"/api-reference/introduction"}]},{"tab":"v2 API","pages":[{"title":"v2 API","href":"/api-reference/v2/introduction"}]},{"tab":"v3 API (SDK)","pages":[{"title":"v3 API (SDK)","href":"/api-reference/sdk/changelog"}]},{"tab":"MCP Reference","pages":[{"title":"MCP Reference","href":"/core/how-it-works/mcp/ana-as-mcp-server"}]},{"tab":"Helm Charts","pages":[{"title":"Helm Charts","href":"/helm-charts/installation"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/product/changelog"}]}]},"basePath":"","title":"Context Scoping - TextQL Docs","buildId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","deploymentId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-B90Qhg8r.js","DynamicMarkdown-DpAS3GCb.js","zoom-image-lightbox-9bQKnClW.js","lightbox-handle-r17bVUz3.js"]}