Skip to content

Conversation

susan-shu-c
Copy link
Member

Overview

This RFC proposes GenAI fields, gen_ai*, with the increase of Generative AI and LLM logging. This will benefit our customers and users, allowing them to monitor and protect their LLM/Generative AI deployments.

Stage 0:

Stage 1:

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • For proposing substantial changes or additions to the schema, have you reviewed the RFC process?
  • If submitting code/script changes, have you verified all tests pass locally using make test?
  • If submitting schema/fields updates, have you generated new artifacts by running make and committed those changes?
  • Is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • Have you added an entry to the CHANGELOG.next.md?

@susan-shu-c susan-shu-c requested a review from a team as a code owner May 20, 2025 19:45
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@susan-shu-c susan-shu-c changed the title [RFC 0050] Stage 1: Introducing GenAI fields [RFC 0050] Stage 2: Introducing GenAI fields May 20, 2025
@susan-shu-c
Copy link
Member Author

@mjwolf @trisch-me quick follow up on this PR for gen_ai stage 2

@trisch-me
Copy link
Contributor

trisch-me commented May 26, 2025

hey @susan-shu-c could you update/regenerate all the files as stage 2 is the latest stage before fields are going to the beta stage.
Also please update ecs-semconv mapping

@susan-shu-c
Copy link
Member Author

Thank you @trisch-me I've taken a look at the link you posted, and followed the steps:

  • Add gen_ai.yml to schemas/
  • Run make, make test
  • Fix build errors

As this is my first time going through the process, please let me know if there's anything I have missed!

@mjwolf
Copy link
Contributor

mjwolf commented May 27, 2025

Hi @susan-shu-c, ECS has some newer fields in the schema that are used to generate documentation on the relationship between ECS and otel fields. It would be good to add these to schemas/gen_ai.yml, to track the relationship with the otel schema.

We don't have much documentation on using this yet, we have plans to improve the documentation soon. But for now, you can reference this PR, look some existing fields, for example https://github.com/elastic/ecs/blob/main/schemas/base.yml#L44-L57, or you can ask me if you have questions about it.

@susan-shu-c
Copy link
Member Author

Thank you @mjwolf I've added the beta and otel relation fields

@susan-shu-c susan-shu-c requested a review from mjwolf May 29, 2025 16:00
mjwolf added 2 commits May 30, 2025 11:22
It's not required to have `gen_ai` in the root of field names, this will
be inherited from the group name, so its been removed.
@mjwolf
Copy link
Contributor

mjwolf commented May 30, 2025

I've made a few changes to schemas/gen_ai.yml. I've added copyright header, added some missing fields to the top group, and renamed fields by removing the leading gen_ai. gen_ai. will be taken from the group, so it wasn't needed in each field.

Although this PR is block until #2483 is merged, which will update the semconv version ECS is built against, and is needed to get these gen_ai fields from the semconv schema.

@mjwolf
Copy link
Contributor

mjwolf commented Jun 2, 2025

This is the preview of the gen_ai field doc page: https://docs-v3-preview.elastic.dev/elastic/ecs/pull/2475/reference/ecs-gen_ai

@susan-shu-c
Copy link
Member Author

Thanks a lot for the surrounding work on this!
Taking a look- There's this detail with the links from the generated docs @mjwolf

Screenshot 2025-06-02 at 3 50 08 PM

The correct url for some reason is attributes/gen-ai/ instead of attributes/gen_ai/

@susan-shu-c
Copy link
Member Author

susan-shu-c commented Jun 5, 2025

Hi @mjwolf with the merge of #2486 I suppose we'll need to re-generate the docs before merging right? I'll aim to merge this unless something else is pending?

@mjwolf
Copy link
Contributor

mjwolf commented Jun 5, 2025

Hi @mjwolf with the merge of #2486 I suppose we'll need to re-generate the docs before merging right? I'll aim to merge this unless something else is pending?

Hi, yes. If you run make and commit the result that should be all you need to do before merging. There should be nothing else needed for this now.

@susan-shu-c susan-shu-c merged commit 783a85d into main Jun 5, 2025
6 checks passed
@eyalkoren
Copy link
Contributor

@susan-shu-c please see this comment in the PR that updates ecs@mappings to include the new fields.

@susan-shu-c
Copy link
Member Author

Proposing an update to this stage 2 here: #2489

namely, updating gen_ai.request.model and gen_ai.agent.description from text to keyword.

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

Successfully merging this pull request may close these issues.

4 participants