-
Couldn't load subscription status.
- Fork 76
Add deep search page to docs #1150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
946ac17
Add deep search page to docs
janhartman 33f9a69
Merge branch 'main' into jan/deep-search-docs
janhartman 217fc28
Code review comments
janhartman 227082a
Add Bedrock config
janhartman 928875e
Merge remote-tracking branch 'origin/main' into jan/deep-search-docs
janhartman 72d4ab7
Add feedback from docs
MaedahBatool 3089015
Minor changes
janhartman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Deep Search | ||
|
|
||
| <p className="subtitle">Learn more about Sourcegraph's Deep Search.</p> | ||
|
|
||
| <Callout type="note"> New in version 6.4. Deep Search is a feature currently in research preview for Enterprise customers with access to Cody and Code Search. Because Deep Search is in research preview, the feature might change significantly in the future as we make improvements and adjust to user feedback. Please reach out to your account team to request access. </Callout> | ||
|
|
||
| Deep Search is an agentic code search tool. | ||
| It receives a natural language question about a codebase, performs an in-depth search, and returns a detailed answer. The user can also ask follow-up questions to further improve the answer. | ||
|
|
||
| Under the hood, Deep Search is an AI agent that uses a variety of tools to generate its answer. The tools include various modes of Sourcegraph's code search and code navigation tools. The use of tools in an agentic loop enables Deep Search to iteratively refine its understanding of the question and codebase, searching until it is confident in its answer. | ||
|
|
||
| Deep Search displays a list of sources it used to generate the answer. The sources are the various types of searches it performs as well as the files it reads. | ||
| The answer is formatted in Markdown. If prompted to do so, Deep Search can also generate diagrams as part of its answer. | ||
|
|
||
| ## Best practices | ||
| - Give the agent a starting point for the search: mention relevant repositories, files, directories or symbol names. The more specific you are, the faster the search will be. | ||
| - Provide reasonably scoped questions. The agent will perform much better if it does not have to read the entire codebase at once. | ||
| - Check the list of sources. This is extremely useful for debugging and for understanding where the answer came from. If something is missing, ask a follow-up question and mention the missing source. | ||
|
|
||
| ### Examples of prompts | ||
| - Find examples of logger usage and show examples of the different types of logging we use. | ||
| - I want to know when the indexing queue functionality was last changed in `sourcegraph/zoekt`. Show me the last few commit diffs touching this code and explain the changes. | ||
| - Look at the GraphQL APIs available in `sourcegraph/sourcegraph`. Are any of them unused? The client code is in `sourcegraph/cody`. | ||
| - Which tools do we use in our build processes defined in `BUILD.bazel` files? | ||
| - Generate a diagram of the request flow in `src/backend`. Mark the auth and rate limit points. | ||
|
|
||
| ## Enabling Deep Search | ||
| Deep Search can only be used on Sourcegraph instances with licenses for both Code Search and Cody. | ||
|
|
||
| Deep Search is disabled by default. To enable it, ask your site administrator to set `experimentalFeatures.deepSearch.enabled = "true"` in your site configuration. | ||
|
|
||
| For optimal performance, we have specialized Deep Search to only use one model. __Currently, Deep Search only supports Claude Sonnet 4.__ | ||
|
|
||
| ### Configuring Deep Search on Amazon Bedrock | ||
| Include configuration for Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides) in your site configuration. Refer to [Model Configuration](/cody/enterprise/model-configuration) for more info on how to configure models. | ||
|
|
||
| Example for Sonnet 4 configuration inside `modelOverrides`: | ||
| ```json | ||
| { | ||
| "modelRef": "aws-bedrock::v1::claude-sonnet-4", | ||
| "modelName": "us.anthropic.claude-sonnet-4-20250514-v1:0", | ||
| "displayName": "Claude Sonnet 4 (AWS Bedrock)", | ||
| "capabilities": [ | ||
| "chat", | ||
| "tools", | ||
| ], | ||
| "category": "balanced", | ||
| "status": "stable", | ||
| "contextWindow": { | ||
| "maxInputTokens": 200000, | ||
| "maxOutputTokens": 32000, | ||
| } | ||
| }, | ||
| ``` | ||
|
|
||
| Then, configure Deep Search to use this model in `experimentalFeatures`: | ||
| ```json | ||
| "experimentalFeatures": { | ||
| "deepSearch.enabled": true, | ||
| "deepSearch.model": "aws-bedrock::v1::claude-sonnet-4" | ||
| }, | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.