Skip to content

[FR] Improve AI search, avoid hitting maximum context length #776

@rgpublic

Description

@rgpublic

I think the AI search ("Ask") feature could be improved a lot. Right now, you can quickly select one repository or do a global search with one click. It's quite tedious to select individual repos and if you have a global question it's often unclear which repositories you should select in the first place. Sourcebot' most powerful feature is to be able to search globally.

nfortunately, it's too easy to hit the maximum context size of a model. I think the AI feature should be a bit more intelligent on what it does. For example, one of the most frequent questions we have is: "Where do I find...."? For example: "Where do I find the arrow icon image file?" etc.

In this case, it should perhaps first find out which files might be affected at all (PNG, JPEG, SVG). Then it should search over filenames and paths only and see whether it could answer the question that way. Perhaps it should even automatically try to segment the search and search iteratively over chunks of e.g. 16 repositories. I think a lot more stuff could be done to make this feature work better. Right now most global searches end without an answer due to context limits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ask_sbIssue related to Ask Sourcebot. https://docs.sourcebot.dev/docs/features/ask/overviewenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions