Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick a set of LLM systems to support/prototype #839

Open
lmolkova opened this issue Mar 27, 2024 · 6 comments
Open

Pick a set of LLM systems to support/prototype #839

lmolkova opened this issue Mar 27, 2024 · 6 comments
Assignees

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Mar 27, 2024

In the #825 we only mention openai, but we should pick a set of vendors/systems we want to support and prototype/validate if attributes/events are applicable to them.

@lmolkova lmolkova converted this from a draft issue Mar 27, 2024
@lmolkova lmolkova changed the title Pick a set of LLM systems to prototype Pick a set of LLM systems to support/prototype Mar 27, 2024
@iag
Copy link

iag commented Mar 27, 2024

When talking about "LLM Systems" we may want to consider:

  • Vendor: Google, OpenAI, Cohere, ... (could be used to determine issues with specific vendor, cost calculation,...)
  • Model Family: Gemini, GPT-4 (may not be necessary but could be used for aggregation)
  • Model: gemini-1-0-pro, gpt-4-0125-preview (for detailed understanding of model used to generate response)

@lmolkova lmolkova assigned drewby and cartermp and unassigned arminru Apr 17, 2024
@mxiamxia
Copy link
Member

mxiamxia commented May 1, 2024

AWS Bedrock supports multiple models, I can help to create the prototype against Bedrock LLM interactions with OTel Java SDK auto-instrumentation (and Python later), and adhering to span semantic convention definitions.

@bhanupisupati
Copy link

NViDIA supports AI Foundation endpoints (https://www.nvidia.com/en-us/ai-data-science/foundation-models/) that we would like to support for generating open telemetry based traces using these semantic conventions.

Note that NVIDIA generative AI examples repo showcases adding open telemetry based observability for Python based generative AI applications using langchain and llama index. Please see:
https://github.com/NVIDIA/GenerativeAIExamples/blob/main/docs/observability.md

We will explore modifying these traces to adhere to the proposed semantics.

In a side note, we would like to present the current work performed for supporting open telemetry based testing for llm, RAG, vector databases etc detailed in the documentation above. Is there a periodic sync up of this community where we can present?

@gyliu513
Copy link
Member

gyliu513 commented May 8, 2024

@bhanupisupati
Copy link

bhanupisupati commented May 10, 2024 via email

@karthikscale3
Copy link
Contributor

karthikscale3 commented May 15, 2024

I have reviewed the API docs of Anthropic, Cohere and Google and also the new model spec introduced by OpenAI that has some changes. Described below is the summary of my findings along with proposed recommendations for the same. After discussing this on the WG call, I am happy to make a PR for the same.

  1. OpenAI introduced a new model spec where they are renaming ‘system’ role to ‘developer’ role.

Proposal:

Rename gen_ai.system.message -> gen_ai.developer.message

  1. OpenAI introduced a new role called ‘tool’ which has the content generated by a tool like a program.

Proposal: Introduce gen_ai.tool.message

  1. Clarification required

Difference between gen_ai.assistant.message vs gen_ai.choice

Should we just stick to gen_ai.assistant.message?

Proposal: stick to gen_ai_assistant.message

  1. Stop Sequences

We need to instrument stop which is used for providing up to 4 sequences where the API will stop generating further tokens. This is provided by other LLM vendors like anthropic and cohere aswell.

Proposal: Introduce gen_ai.request.stop

  1. Top K

Anthropic also provides an option to specify top_k. This option lets the developer only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses.

Proposal: Introduce gen_ai.request.top_k

  1. Anthropic

Equivalent attributes(Maps from OpenAI -> Anthropic):

  • finish_reason -> stop_reason
  • stop -> stop_sequences

These attributes need to be mapped accordingly by the instrumentation library.

  1. Cohere

Equivalent attributes(Maps from OpenAI -> Cohere):

  • Role: Assistant -> CHATBOT

  • Role: System -> Preamble

There is an additional “preamble” field in addition to the system role. Preamble adds content to the top of the messages fed to the LLM and adjusts the model behavior for the entire conversation while system message is part of the message history.

Proposal: introduce a new field gen_ai.request.preamble

  • chat_history is a list of messages(objects)

Proposal: Should be transformed and mapped to gen_ai.user.message as a list of json objects

  • Connectors
    This is a list of objects used for connecting to different data sources to fetch additional data from and passing it to the LLM. Ex: web search.

Proposal: Introduce gen_ai.request.connectors

  • Documents
    A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.

Proposal: Introduce gen_ai.request.documents

  • frequency_penalty and presence_penalty
    Proposal: Introduce gen_ai.request.frequency_penalty and gen_ai.request.presence_penalty.
  1. Google
  • Safety Settings
    Proposal: Introduce gen_ai.request.safety_settings which is a list of objects.

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

No branches or pull requests

9 participants