Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- Working Branch for May Release -->

# Sourcegraph Docs

<!-- Working branch for SG 6.3 Release -->
<!-- Working branch for Sourcegraph 6.4 Release -->

Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack.

Expand Down
1 change: 1 addition & 0 deletions docs/batch-changes/bulk-operations-on-changesets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Below is a list of supported bulk operations for changesets and the conditions w
| **Close** | Close the selected changesets on the code hosts |
| **Publish** | Publishes the selected changesets, provided they don't have a [`published` field](/batch-changes/batch-spec-yaml-reference#changesettemplatepublished) in the batch spec. You can choose between draft and normal changesets in the confirmation modal |
| **Export** | Export selected changesets that you can use for later use |
| **Re-execute** | Users can re-execute individual changeset creation logic for selected workspaces. This allows for creating new changesets for users who are using non-deterministic run steps (for example,LLMs) |

## Monitoring bulk operations

Expand Down
5 changes: 5 additions & 0 deletions docs/batch-changes/how-src-executes-a-batch-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Here, you will learn what happens when a user applies or previews a Batch Spec b
- [Sending changeset specs](#sending-changeset-specs)
- [Sending the batch spec](#sending-the-batch-spec)
- [Preview or apply the batch spec](#preview-or-apply-the-batch-spec)
- [Halt execution](#halt-execution)

The only difference is the last step, i.e., Preview or apply the batch spec. Here, the `src batch apply` command applies the batch spec, and the `src batch preview` prints a URL that gives you a preview of what would change if you applied the batch spec.

Expand Down Expand Up @@ -185,3 +186,7 @@ That request yields an ID uniquely identifying this expanded batch spec version.
If `src batch apply` was used, then the ID of the batch change is used to send another request to the Sourcegraph instance to apply the batch spec.

If `src batch preview` was used to execute and create the batch spec, then a URL is printed, pointing to a preview page on the Sourcegraph instance, on which you can see what would happen if you were to apply the batch spec.

### Halt execution

If you encounter an error while running the `src batch preview` command, there is a fail-fast mode that halts the batch change execution immediately. To implement this, you can add a `-fail-fast` flag to the `src batch preview` and `src batch apply` commands. Once added, your execution should immediately halt on the first error instead of continuing with other repositories. This streamlines the iteration loop for users building a batch change who want to identify errors quickly.
66 changes: 66 additions & 0 deletions docs/code-search/types/deep-search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Deep Search

<p className="subtitle">Learn more about Sourcegraph's agentic Code Search tool Deep Search.</p>

<Callout type="note"> N ew 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>

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.

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.

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.

## 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 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 request flow diagram for `src/backend`. Mark the auth and rate limit points.

## Enabling Deep Search

Deep Search can only be used on Sourcegraph instances with Code Search and Cody licenses.

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, Deep Search is specialized 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. For more information on configuring models, refer to [Model Configuration](/cody/enterprise/model-configuration).

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"
},
```
73 changes: 0 additions & 73 deletions docs/cody/capabilities/agentic-chat.mdx

This file was deleted.

Loading