LogoLogo
Tabnine websiteContact Sales
  • 👋Welcome
    • Overview
      • Architecture
        • Deployment options
      • Security
      • Privacy
      • Protection
        • Provenance and Attribution
      • Personalization
        • Tabnine’s Personalization in Depth
        • Connection: Global Codebase Awareness
      • AI Models
        • Tabnine's private and protected Universal models
        • Tabnine's fine-tuned AI models
      • Integrations
        • Atlassian Jira
      • System Requirements
      • Supported Languages
      • Supported IDEs
      • Tabnine Subscription Plans
        • Dev Preview
        • Dev
        • Enterprise (SaaS)
        • Enterprise (private installation)
    • Support & Feedback
  • 🚀Getting started
    • Install
      • Client setup (SaaS)
        • VS Code
          • Install Tabnine in VS Code
          • Activate Tabnine in VS Code
        • JetBrains IDEs
          • Install Tabnine in a JetBrains IDE
          • Activate Tabnine in a JetBrains IDE
        • Visual Studio
          • Install Tabnine in Visual Studio 2022
          • Activate Tabnine in Visual Studio 2022
        • Eclipse
          • Install Tabnine in Eclipse
          • Activate Tabnine in Eclipse
        • Sign in
          • Using an email
          • Using an authentication token
      • Client setup (private installation)
        • Join your team (private installation)
        • VS Code (private installation)
        • JetBrains IDEs (private installation)
        • Visual Studio (private installation)
        • Eclipse (private installation)
    • Quickstart Guide
      • Menus and Icons
    • Getting the Most from Tabnine Code Completions
      • Code Acceptance Logs
      • Pause (snooze)
    • Getting the Most from Inline Actions
    • Getting the Most from Tabnine Chat
      • Launching Tabnine Chat
      • Interacting with Tabnine Chat
      • Reviewing suggestions
      • Writing prompts
      • Chat Context
        • Understanding Context
        • Jira Connection
        • Context Scoping
      • Conversing with Tabnine Chat
      • Switching between chat AI models
      • Image Prompts
      • Tabnine's Prompting Guide
        • Getting Started
        • Basic Prompting
          • Be specific and clear
          • Define the context
          • Start a fresh conversation as appropriate
          • Include necessary details
          • Ask for examples
          • Be concise but complete
  • 💪Software Development with Tabnine
    • Overview
    • Plan
    • Create
    • Test
      • Intro to the Test Agent
      • Test Agent Workflow
      • Custom Commands
      • Generate Test Files with @Mentions
    • Review
    • Fix
    • Document
    • Explain
    • Maintain
  • 🏭Administering Tabnine
    • Start a team
    • Manage a team
    • SaaS
      • Enterprise (SaaS) team admin
        • Set up a Tabnine Enterprise (SaaS) account
        • Invite team members
        • Manage your team
        • AI models for Chat (Enterprise SaaS)
      • Enterprise (SaaS) team member
        • Join your Tabnine team by invitation email (team member)
        • Join Tabnine team by link (member)
    • Private installation
      • Server setup guide
        • Kubernetes (MicroK8s) Installation guide
        • Deployment guide
          • Tabnine update guide
        • Air-gapped deployment guide
      • Admin guide
        • Monitoring Tabnine
        • Prometheus Operator install
        • Audit logs
      • Managing your team
        • Tabnine teams
        • Roles in an enterprise
        • Inviting users to your team
        • Deactivating and reactivating users
        • Deleting PII data of a deactivated user
        • Reset user's password
        • Usage reports
          • Reports Glossary
          • CSV-based reports (V2)
            • Configuring scheduled CSV reports
            • CSV-based reports V1 (Depracted since version 5.7.0
          • Usage API
        • Settings
          • General
          • Single Sign-On (SSO)
          • Personalization (f.k.a. Workspace)
            • Connecting to External Code Repositories
          • Email
          • License
          • Models
          • Access Tokens
        • IdP Sync
      • Release Notes
  • 📣Product Updates
    • What's new?
      • What's new? (August 2024)
      • What's new? (July 2024)
      • What's new? (June 2024)
      • What's new? (May 2024)
      • What's new? (April 2024)
      • What's new? (March 2024)
      • What's new? (February 2024)
      • What's new? (January 2024)
Powered by GitBook
On this page
  • What is Context Scoping?
  • Why is this important?
  • Working with Context Scoping
  • Types of Scoping
  • Managing and Adjusting Context Scoping

Was this helpful?

  1. Getting started
  2. Getting the Most from Tabnine Chat
  3. Chat Context

Context Scoping

Determining which specific resources Tabnine uses to adjust its answers

Last updated 2 months ago

Was this helpful?

Context Scoping is a mechanism that explicitly shows the user the scope in which Tabnine searches for relevant context.

For private installations, context scoping became available from version 5.15.0 and replaced the Workspace selector.

What is Context Scoping?

Tabnine Chat searches for additional relevant context beyond the user's prompt to help answer questions more effectively. The relevant context can be found in various sources:

  • The current open file

  • The current conversation history

  • The local workspace in the IDE

  • Connected remote repositories from the organization's codebase (Enterprise only)

Context Scoping is a mechanism that explicitly shows the user the scope in which Tabnine searches for relevant context. It allows users to refine the scope, guiding Tabnine on where to look or where not to look for context.

Why is this important?

The additional relevant context is passed to the AI model, directly affecting the accuracy of the Chat answer. In some cases, the most relevant context was not added, and the answers were not as accurate as expected. This can happen due to various reasons; the most common ones are that there is too much code to look in or similar content that "hides" the actually relevant context. Scoping allows users to direct Tabnine's focus on relevant areas, improving the results.

For example, by default Tabnine prefers the context from the current files and local workspaces, as it usually provides the most relevant context. However, for some questions the most relevant context is actually in a remote repository. The user can change the context scope to a remote codebase or specific remote repository, resulting in more accurate answers.

Working with Context Scoping

The chat context scoping is managed for each chat conversation. The state of the context scoping of the conversation appears in a dedicated section next to the user prompt. Each type of scope is indicated with the relevant tag representing that scope. Tabnine will only search for relevant context in the existing context scoping.

Types of Scoping

High-Level Scopes

  • Current file: Tabnine can take the context from the current open file, if an open file exists. If this scope is not selected, Tabnine will ignore the current file.

  • Local Workspace: Tabnine can look for relevant context in the local IDE workspace. If this scope is not selected, Tabnine will not look for relevant context in the local IDE workspace.

Local Indexing:

If folders are not under version control (which might not be the case for local folders), then Tabnine by default won't index the folder. To fix this, create a file named .tabnine_root in the root folder, then restart your IDE. This will signal to Tabnine to index local content in the root folder.

  • Remote Codebase: Tabnine can look for relevant context in all the remote repositories connected to the account from the codebase. If this scope is not selected, Tabnine will not look for relevant context in the connected repositories.

Specific Scopes

  • Remote repository: Indicates a specific remote repository from the codebase which is connected to the account.

  • Folders and files from remote repositories in the codebase [Coming soon! ]

  • Folders from the local workspace [Coming soon! ]

Managing and Adjusting Context Scoping

Context scoping is defined at the Chat conversation level.

Each conversation maintains a separate scoping status. Each conversation starts with the default scoping, and the user can change the scoping by adding and removing scope.

Scoping State

The following three options comprise the default scoping state:

  • Current file

  • Local workspace

  • Remote codebase (Enterprise only, if the account has connected repositories)

The default scoping appears when starting a new conversation or when resetting the scope, ensuring that Tabnine searches for context using the initial settings before any customizations.

While not part of the default scoping state, you can also add your Terminal to your context scope. The following will show you how to modify resources in your context scope with reset, adding, and removing:

Resetting Scope

Adding More Scope

The user can add more scope by clicking the "+ Add scope" option and choosing the scope to add.

High-level scope can be added by checking the high-level option in the Add context scope menu.

Remote repositories, remote folders, and/or remote files are added by clicking the relevant option in the menu and then select (or search) for the desired repository:

The Terminal is added by selecting it from the + Add scope menu.

Removing Scope

Scope can be removed by simply clicking small "x" icon on the on each scope tag.

High-level scoping can also be removed by unchecking the high-level option in the Add context scope menu.

You can also tap the "x" option inside the input menu:

To reset the context scope, click the " Reset scope" option in the input window:

🚀
Resetting scope in Tabnine
Deleting context scope within the input window