Visitar URL original
System prompt not taken into account when web browsing. · Issue #1159 · huggingface/chat-ui · GitHub
Skip to content

System prompt not taken into account when web browsing. #1159

Open

Description

@CakeCrusher

I have not inspected the code but this is why I suspect this.
I created an assistant that should be explicitly searching for "University of Florida":
image
https://hf.co/chat/assistant/664e60ae000c01b5d327de43

And when I ask for help on a college related topic I get this:
image

None of the URLs were related to "University of Florida".

I tried it several times with similar prompts and nothing.
This works in OpenAI's GPTs store

Activity

  1. nsarrazin commented on May 27, 2024

    @nsarrazin
    Contributor

    Hey, so we indeed do not take the system prompt into account for generating the websearch query. I guess it would make sense to have it when generating the prompt as well.

  2. neven4 commented on Jun 14, 2024

    @neven4
    Contributor

    Hi there, @nsarrazin how do you want to approach this: by adding 'System instruction' to a web search query, or by asking a model to create a web search query from a user query and a 'System instruction'?

  3. neven4 commented on Jun 20, 2024

    @neven4
    Contributor

    Hi there, @nsarrazin how do you want to approach this: by adding 'System instruction' to a web search query, or by asking a model to create a web search query from a user query and a 'System instruction'?

    Hi @nsarrazin, WDYT?

  4. nuthalapativarun commented on Jun 26, 2026

    @nuthalapativarun

    Since this was filed, web search has been refactored to go through MCP tool calls rather than a standalone module. In the current flow, conv.preprompt is passed as preprompt into runMcpFlow (see src/lib/server/textGeneration/index.ts L51–54), which merges it with the tool-use preprompt and injects it as the system message before the first completion call (runMcpFlow.ts L353–369). So the assistant's system prompt is technically present when the model decides what to search for — the remaining question is whether the model actually honors it when generating search queries. Can anyone confirm whether this is still reproducible against the current MCP-backed search? Happy to dig into the search query construction path if so.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    backThis issue is related to the Svelte backend or the DBenhancementNew feature or requestgood first issueGood for newcomerswebsearch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions