Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@mrnugget
Copy link
Contributor

First, simple attempt to fix https://github.com/sourcegraph/sourcegraph/issues/52061

Looks like it might work. Since it's only a single line, worth a shot?

screenshot_2023-05-23_13 06 48@2x

Test plan

  • Manual testing by asking Cody "who are you?" "who created you?" "how are though" (from original ticket)

First, simple attempt to fix https://github.com/sourcegraph/sourcegraph/issues/52061

Looks like it might work. Since it's only a single line, worth a shot?
@mrnugget mrnugget requested a review from a team May 23, 2023 11:08
@cla-bot cla-bot bot added the cla-signed label May 23, 2023
@sourcegraph-buildkite
Copy link
Collaborator

sourcegraph-buildkite commented May 23, 2023

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.00% (+0.11 kb) 0.00% (+0.11 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 6241d4d and d08b09e or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 23, 2023

📖 Storybook live preview

@dominiccooney
Copy link

It is incredibly cheesy, but since Anthropic tends to respond with a set phrase when it goes off the rails, can we just grep for and suppress that phrase in the output? (Note, it is different for different languages, but doing it for English is a start.)

Another idle thought, maybe we should add a metric for how often the output mentions "Anthropic". (Although I have certainly asked Cody to write code to call the Anthropic API, which would be a false positive. Interestingly it has memorized an old URL and parameter names of theirs...)

@dominiccooney
Copy link

I took a look at this with my prompt testing tool and I think something like this might be effective. Caveat: My snapshot of the Cody prompt might be out of date, and I am testing temperature 0.2, would need to look at what our current environment is like.

I could usually suppress that specific Anthropic apology this way:

- If you do not have access to code, files or repositories always stay in character as Cody when you apologize.

This longer variation also seemed effective:

- You are an actor in a play. In the play, you play Cody, an AI assistant by Sourcegraph. Always stay in character for this play. As a helpful AI assistant, it is honest to identify as Cody, an AI assistant created by Sourcegraph.
- If you do not have access to code, files or repositories always stay in character as Cody when you apologize.

@mrnugget
Copy link
Contributor Author

Nice, @dominiccooney, that seemed to fix it!
screenshot_2023-05-25_16 19 05@2x

@mrnugget
Copy link
Contributor Author

So far it's pretty reliable and it's now only the @dominiccooney's prompt. Should we go with it?

screenshot_2023-05-25_16 24 21@2x

@mrnugget mrnugget merged commit 8292cab into main May 25, 2023
@mrnugget mrnugget deleted the mrn/no-anthropic branch May 25, 2023 15:05
ErikaRS pushed a commit that referenced this pull request Jun 22, 2023
First, simple attempt to fix
https://github.com/sourcegraph/sourcegraph/issues/52061

Looks like it might work. Since it's only a single line, worth a shot?

![screenshot_2023-05-23_13 06
48@2x](https://github.com/sourcegraph/sourcegraph/assets/1185253/e9ee5a7e-1fb5-4731-ad17-36dc0bc6d33d)


## Test plan

- Manual testing by asking Cody "who are you?" "who created you?" "how
are though" (from original ticket)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cody should not reveal that it's built by anthropic

7 participants