You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-search/types/deep-search.mdx
+48-14Lines changed: 48 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,44 +1,75 @@
1
1
# Deep Search
2
2
3
-
<pclassName="subtitle">Learn more about Sourcegraph's agentic Code Search tool Deep Search.</p>
3
+
<pclassName="subtitle">Learn more about Sourcegraph's agentic Code Search tool Deep Search.</p>
4
4
5
-
<Callouttype="note"> New in version 6.4. Deep Search is currently in research preview for Enterprise customers with access to Cody and Code Search. Because Deep Search is in research preview, it might change significantly in the future as we make improvements and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. </Callout>
5
+
<Callouttype="note"> New in version 6.5. Deep Search is currently in research preview for Enterprise and Enterprise Starter customers. Because Deep Search is in research preview, it might change significantly as we improve and adjust to user feedback. Please reach out to your Sourcegraph account team to request access. </Callout>
6
6
7
-
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 improve the answer further.
7
+
Deep Search is an agentic code search tool that understands natural language questions about your codebase. When a question is submitted, Deep Search performs an in-depth search and returns a detailed answer. The conversation can be continued with follow-up questions to dive deeper into relevant code.
8
8
9
-
Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. These tools include multiple modes of Sourcegraph's Code Search and Code Navigation tools. Using 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.
9
+
Under the hood, Deep Search is an AI agent that uses various tools to generate its answer. The tools are functionalities available in Sourcegraph. They include multiple modes of Sourcegraph's Code Search and Code Navigation features. All processing happens within your Sourcegraph instance. Only external calls are made to the configured LLM.
10
10
11
-
Deep Search displays a list of sources used to generate the answer. The sources are the various types of searches it performs and 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.
11
+
The core of Deep Search is an agentic loop. The AI agent can intelligently use tools to explore the codebase. In each loop iteration, the agent gradually refines its understanding of the question and codebase, searching until it is confident in its answer.
12
+
13
+
Every Deep Search response includes a detailed list of sources contributing to the answer. These sources show exactly which searches were performed and which files were read. The list of sources is extremely useful for understanding where the answer came from and for further explorations of the codebase.
14
+
15
+
The answer is formatted in Markdown and can include links to relevant files, directories, or repositories. If prompted to do so, Deep Search can also generate diagrams as part of its answer.
12
16
13
17
## Best practices
14
18
15
-
- 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.
19
+
- Give the agent a starting point for the search: use @-mentions to mention relevant repositories, files, directories, or symbol names. The more specific you are, the faster the search will be.
16
20
- Provide reasonably scoped questions. The agent will perform much better if it does not have to read the entire codebase at once.
17
-
- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. If something is missing, ask a follow-up question and mention the missing source.
21
+
- Check the list of sources. This is extremely useful for debugging and understanding where the answer came from. Ask a follow-up question and mention the missing source if something is missing.
22
+
23
+
For use cases where you're looking for exhaustive answers (for example, "Find all files with the `.XYZ` file extension in `foo' repo that contain the word`bar`), Code Search still excels, while Deep Search will only utilize a sample of the results. Deep Search will perform a Code Search query as a source, which you can use to continue an exhaustive search within the Code Search product.
18
24
19
25
### Examples of prompts
20
26
21
27
- Find examples of logger usage and show examples of the different types of logging we use.
22
-
- 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.
23
-
- Look at the GraphQL APIs available in `sourcegraph/sourcegraph`. Are any of them unused? The client code is in `sourcegraph/cody`.
28
+
- I want to know when the indexing queue functionality was last changed in `@zoekt`. Show me the last few commit diffs touching this code and explain the changes.
29
+
- Look at the GraphQL APIs available in `@sourcegraph/sourcegraph`. Are any of them unused? The client code is in the `@cody` repository.
24
30
- Which tools do we use in our build processes defined in `BUILD.bazel` files?
25
31
- Generate a request flow diagram for `src/backend`. Mark the auth and rate limit points.
26
32
33
+
## Conversation sharing
34
+
35
+
<Callouttype="note">Conversation sharing is disabled by default - see below for instructions on enabling it. </Callout>
36
+
37
+
You can share Deep Search conversations with other users in your Sourcegraph instance. To share a conversation, click the "Share" button in the top left, then copy the link. Once you share a conversation, any user on your instance can view it with the link. You can also reset the share link and generate a new one, invalidating the previous link.
38
+
39
+
We do not enforce [repository permissions](/admin/permissions) for viewing shared Deep Search conversations. This means that a user can view a conversation shared with them, regardless of which repositories they can access. We plan to revisit this in the future.
40
+
27
41
## Enabling Deep Search
28
42
29
-
Deep Search can only be used on Sourcegraph instances with Code Search and Cody licenses.
43
+
If Deep Search is disabled, ask your site administrator to enable the following setting in your site configuration:
44
+
```json
45
+
"experimentalFeatures": {
46
+
"deepSearch.enabled": true,
47
+
},
48
+
```
49
+
50
+
For optimal performance, Deep Search is specialized only to use one model. Currently, Deep Search only supports Claude Sonnet 4.
51
+
52
+
If you are not using [Cody Gateway](/cody/core-concepts/cody-gateway), you must also configure the model through Amazon Bedrock or GCP Vertex.
53
+
54
+
### Enabling conversation sharing
30
55
31
-
Deep Search is disabled by default. To enable it, ask your site administrator to set `experimentalFeatures.deepSearch.enabled = "true"` in your site configuration.
56
+
Conversation sharing is disabled by default. To enable conversation sharing, ask your site administrator to enable the following setting in your site configuration:
32
57
33
-
For optimal performance, Deep Search is specialized to only use one model. Currently, Deep Search only supports Claude Sonnet 4.
58
+
```json
59
+
"experimentalFeatures": {
60
+
"deepSearch.enabled": true,
61
+
"deepSearch.sharing.enabled ": true,
62
+
},
63
+
```
34
64
35
65
### Configuring Deep Search on Amazon Bedrock or GCP Vertex
36
66
37
-
Include configurationfor Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides) in your site configuration. For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration).
67
+
In your site configuration, include the configuration for Claude Sonnet 4 in [modelOverrides](/cody/enterprise/model-configuration#model-overrides). For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration).
38
68
39
-
Examples for Sonnet 4 configuration inside `modelOverrides`:
69
+
Examples of Sonnet 4 configuration inside `modelOverrides`:
0 commit comments