Context scoping
Last updated
Was this helpful?
Last updated
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 will be available available from version 5.15.0
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.
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.
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.
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.
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.
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! ]
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.
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.
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 are added by clicking the relevant option in the menu and then select (or search) for the desired repository,
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.