Skip to content

deepsearch: add evaluator docs - #1826

Open
kalanchan wants to merge 4 commits into
mainfrom
kalan/evaluator-docs
Open

deepsearch: add evaluator docs#1826
kalanchan wants to merge 4 commits into
mainfrom
kalan/evaluator-docs

Conversation

@kalanchan

Copy link
Copy Markdown
Contributor

closes https://linear.app/sourcegraph/issue/CU-3011/add-evaluator-section-in-deep-search-docs

adds evaluator section in the deep search docs to explain how it works, guardrails, examples etc.

@kalanchan
kalanchan requested a review from a team July 24, 2026 21:06
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sourcegraph-docs Ready Ready Preview Jul 29, 2026 7:54pm

Request Review

Comment thread docs/deep-search/index.mdx Outdated
Comment on lines +57 to +59
## Using Evaluator

Evaluator lets Deep Search write and run Lua scripts over Sourcegraph search results. Deep Search decides when to use Evaluator and writes the script automatically; you do not need to write or run code yourself.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be "using Deep Search"? Plus I don't think we need capital-E evaluator

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think we're separating evaluator here too much.

Also in general, these docs seem a bit too heavy to me - let's focus on the end user's perspective and not expose internal details IMO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some internal details because there were a couple asks in slack (1, 2) around how it works, and it's use cases.

I trimmed down some of it, but I think it's worth having as customers and even our own internal team don't really know how it works. WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the way it's done now looks great - a security section is what these folks were looking for IMO.

@kalanchan

Copy link
Copy Markdown
Contributor Author

@janhartman ready for another round of proof reading!

@eseliger eseliger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if we need to put the evaluator so front and center or simply deep search, which btw can use scripting

- **Repositories** — scope the search to specific repos
- **Files** — point the agent to particular files

## Exhaustive analysis with evaluator

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Exhaustive analysis with evaluator
## Exhaustive analysis

maybe? I feel like you don't need to know, otherwise maybe people get confused that you explicitly need to ask for it?

- **Cross-referencing** — compare multiple searches, such as files that match one implementation pattern but not another.
- **Aggregation and reporting** — group findings by repository, language, team, or dependency and calculate totals.


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


### Security and guardrails

Evaluator runs scripts generated by Deep Search; it does not execute code from your repositories. The sandbox applies the following controls:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Evaluator runs scripts generated by Deep Search; it does not execute code from your repositories. The sandbox applies the following controls:
Deep Search runs small Lua scripts for analysis, it does not execute code from your repositories. The sandbox applies the following controls:


Evaluator runs scripts generated by Deep Search; it does not execute code from your repositories. The sandbox applies the following controls:

- It has no direct network, system, or general filesystem access.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- It has no direct network, system, or general filesystem access.
- It has no network, system, or general filesystem access.


- It has no direct network, system, or general filesystem access.
- Scripts can only use modules provided by Sourcegraph for search, source file reads, formatting, and generated file outputs.
- Search and source file operations are read-only and use Sourcegraph's existing APIs and repository permissions. Searches also use the search context selected for the conversation. Evaluator cannot modify repositories.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Search and source file operations are read-only and use Sourcegraph's existing APIs and repository permissions. Searches also use the search context selected for the conversation. Evaluator cannot modify repositories.
- Search and source file operations are read-only and use Sourcegraph's existing APIs and repository permissions. Searches also use the search context selected for the conversation. Deep Search cannot modify repositories.

- It has no direct network, system, or general filesystem access.
- Scripts can only use modules provided by Sourcegraph for search, source file reads, formatting, and generated file outputs.
- Search and source file operations are read-only and use Sourcegraph's existing APIs and repository permissions. Searches also use the search context selected for the conversation. Evaluator cannot modify repositories.
- The generated file module can only write bounded output files managed by Sourcegraph. It does not provide access to the Sourcegraph host filesystem.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The generated file module can only write bounded output files managed by Sourcegraph. It does not provide access to the Sourcegraph host filesystem.
- Artifacts generated by scripts are stored in object storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants