Skip to content

Support for Perplexity Spaces #367

Closed

Description

@dbolivar

Perplexity added a nice feature a couple of months ago called Perplexity Spaces. In short, it allows for organizing threads inside these so-called Spaces (akin to folders), but for me the greatest feature is the ability to set custom instructions to each space, which gets sent automatically to the chat model as a system prompt.

Each Space has its own URL, with a scheme similar to this: https://www.perplexity.ai/spaces/technical-expert-<random_string>. So one idea to add support for Perplexity Spaces into Code Web Chat would be simply to add the ability to override the provider URL with a custom one. So the user could create multiple Perplexity profiles, each one with a custom URL, targeting a specific Space.

I quickly inspected the HTML of the chat textbox inside a Space, and it looks like the regular textbox, so probably there won't be any need to adjust element IDs: just the URL replacement should be enough.

URL overrides also have the added benefit of bringing more flexibility to other providers as well (especially for self-hosted solutions), besides Perplexity.

Activity

  1. robertpiosik commented on Jul 19, 2025

    @robertpiosik
    Collaborator

    Can you test and compare a solution of using prompt affixes in a preset? If outputs are similar, this has the advantage of being more universal across supported chatbots.

    By the way, AI Studio supports system instructions and interestingly when we were setting "edit format" instructions there some time ago we're getting worse results than now when we set them at the top and bottom in the prompt. Seems like long context messages benefit from repeated instructions at the end.

  2. robertpiosik commented on Jul 19, 2025

    @robertpiosik
    Collaborator
  3. dbolivar commented on Jul 20, 2025

    @dbolivar
    Author

    Can you test and compare a solution of using prompt affixes in a preset? If outputs are similar, this has the advantage of being more universal across supported chatbots.

    It does work, however we still lose the benefit of automatically grouping the chats into a space. By targeting custom URLs, we could have a different space for CWC chats, and even multiple spaces for different projects by creating multiple profiles (besides the added benefit of more flexibility for other chatbots too).

    Another drawback is that custom instructions in the prompt itself may make it a lot bigger, depending on the instructions, possibly affecting the context window (I'm not sure if system prompts also consume the context window), and polluting the chat history.

    By the way, AI Studio supports system instructions and interestingly when we were setting "edit format" instructions there some time ago we're getting worse results than now when we set them at the top and bottom in the prompt. Seems like long context messages benefit from repeated instructions at the end.

    That's interesting. It's not something that happened to me personally, but usually my coding chats are not very long. What I found out, though, is that some models definitely adhere to the system instructions better than others.

  4. robertpiosik commented on Jul 20, 2025

    @robertpiosik
    Collaborator

    I understand your point of view on this issue, and will consider once we're finished with other things like website.

    By the way are you conversing with a model on coding tasks? I suggest you adjusting initial instructions and chat re-initialization. Conversations are not great for coding because they end up having a lot of noise hurting model's performance significantly after just 2-3 turns.

  5. locked and limited conversation to collaborators on Jul 20, 2025
  6. converted this issue into a discussion #368 on Jul 20, 2025
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions