[GH-ISSUE #1096] Question: What is answerKey in the Anthropic index.js file #677

Closed
opened 2026-02-22 18:20:48 -05:00 by yindo · 1 comment
Owner

Originally created by @wallartup on GitHub (Apr 13, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1096

What happened?

Trying to figure out what the Answer Key does as no other LLM requires it. What is the functionality of it? Can't find anything in the anthropic documentation.

Are there known steps to reproduce?

Go to the index file in Anthropic

Originally created by @wallartup on GitHub (Apr 13, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1096 ### What happened? Trying to figure out what the Answer Key does as no other LLM requires it. What is the functionality of it? Can't find anything in the anthropic documentation. ### Are there known steps to reproduce? Go to the index file in Anthropic
yindo added the possible bug label 2026-02-22 18:20:48 -05:00
yindo closed this issue 2026-02-22 18:20:48 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 14, 2024):

It can be removed. When Anthropic first had their API available there was no "chat completion" only "completion" so one clever workaround was using a dynamic answer key so that you could easily parse the response.

eg:
Prompt

<prompt>hello model, I'm asking my question...</prompt>
<context><context>
<ai> response</ai>
<user>user text</user>
.....

Reply would go here and you would just need to "grep" it out, but what if the answer was a question about HTML? Now you have tags in tags..

A random <answerKey123> </answerkey123> would ensure that anything between those tags is what the real completion output was.

This can be deleted since that is no longer how their API works.

@timothycarambat commented on GitHub (Apr 14, 2024): It can be removed. When Anthropic first had their API available there was no "chat completion" only "completion" so one clever workaround was using a dynamic answer key so that you could easily parse the response. eg: Prompt ``` <prompt>hello model, I'm asking my question...</prompt> <context><context> <ai> response</ai> <user>user text</user> ..... Reply would go here and you would just need to "grep" it out, but what if the answer was a question about HTML? Now you have tags in tags.. A random <answerKey123> </answerkey123> would ensure that anything between those tags is what the real completion output was. ``` This can be deleted since that is no longer how their API works.
yindo changed title from Question: What is answerKey in the Anthropic index.js file to [GH-ISSUE #1096] Question: What is answerKey in the Anthropic index.js file 2026-06-05 14:36:37 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#677