[RFC 0052] Stage 2: Update additional GenAI fields #2532
[RFC 0052] Stage 2: Update additional GenAI fields #2532susan-shu-c wants to merge 26 commits intomainfrom
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
Documentation changes preview: https://docs-v3-preview.elastic.dev/elastic/ecs/pull/2532/reference/ |
🔍 Preview links for changed docs |
8ece5e6 to
9b177e4
Compare
1b04b05 to
22cdf78
Compare
trisch-me
left a comment
There was a problem hiding this comment.
as stage 2 is a final stage, please update all examples and generate all fields
|
@susan-shu-c As expected, one potential issue with nested is that the roles are not included with the content. E.g. Sample Doc
This means without additional complexity, it complicates our ability to detect |
|
@Mikaayenson any suggestions for workaround? |
Without complicated ESQL queries, we may have to develop custom ingest pipelines to concat the role and content fields (especially with messages being variable length). There is another fundamental issue where ESQL doesn't currently support type FWIW, there are open issues tracking the gap, but it's unclear when this will be addressed.
IINM, there are no native ESQL ways to walk the array and keep each message's role paired with the content. ESQL does support type On a different topic, I also think we need to include other fields (e.g. bedrock) or at least used in our prebuilt rules. Examples:
|
|
@AlexanderWert can you get your input regarding the type for complex values such as
|
Mikaayenson
left a comment
There was a problem hiding this comment.
After talking with @trisch-me and @joe-desimone, we need to do two additional things:
- Get input from the ESQL team on their ability to support nested/flattened types
- Get input from the other solutions (observability and search) to weigh in on their use cases.
| - name: system_instructions | ||
| level: extended | ||
| type: flattened |
There was a problem hiding this comment.
Note: Some of the points I brought up in #2532 (comment) will apply to flattened as well.
|
@joe-desimone does it gives any disadvantages to the types in PR? or saying differently - are we good to go with the PR and proposed types? |
AlexanderWert
left a comment
There was a problem hiding this comment.
See some comments on the OTel relation of some of the attributes / fields.
Also, please give us a bit more, time! I'd like to discuss this within the Observability / OTel team, since with this OTel any-typed attributes it's a new use case for our OTel ingest handling.
I'd like us to make sure we pick a proper type for these attributes so we don't run into issues later.
|
Nested fields are not supported under Complex attributes types are currently always mapped to flattened in the OTel Collector ES exporter. |
I think we are good for nested or flattened, but in either case we will have a dependency on ES|QL for |
|
@joe-desimone will that dependency on |
Good question @MikePaquette. I have an assumption from an ECS perspective we would be ok since afaik we moved to an opt-in for synthetic source for array fields #2376. But we should ensure this is consistent across o11y/search as well. @andrewkroh any concerns? |
If we are going to explicitly depend on the synthesized
This should be consistent everywhere that logsdb index mode is used because ES sets the default of |
|
From a prebuilt rule perspective, it is unlikely that we will ship OOB protections based on parsing the With that said, we still other rule types in the interim. Just none that can leverage inference-based LLM-as-a-jugde type features. For this PR I'm in favor of taking our time, especially if the ESQL team can prioritize @MikePaquette One thing our Detection Engine team (Yara) mentioned was that anyone who is using or enables logsDB can't rely on |
|
Just got back from PTO, thanks a lot for the discussion folks. It seems like there are many considerations and I'll draft up a summary and see what we'll need. Brief points:
From Security team, rule writing use case / perspective, to leverage ES|QL features that other query languages cannot, OTel (and porting OTel to ECS via this PR) doesn't work well out of the box. For now, I'll gather more information on the requirements from a use case perspective and discuss next steps with all. |
|
Hi! We just realized that we haven't looked into this PR in a while. We're We're labeling this PR as Thank you for your contribution! |
|
I've updated this PR now that there have been recent changes that moves us toward using flattened fields (pending merge).
In addition, based on previous discussions, it seems that
See comment.
See comment
At the time this RFC was drafted, neither
There are tradeoffs, which I've captured here
See comment
See comment This trade-off is something we will need to accept given the OTel compatibility requirement and lack of movement on nested support with ES|QL. |

1. What does this PR do?
2. Which ECS fields are affected/introduced?
Changes based on OTel:
See changes introduced in OTel release: https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.38.0
3. Why is this change necessary?
4. Have you added/updated documentation?
YES / NO / N/A
5. Have you built ECS and committed any newly generated files?
YES / NO
6. Have you run the ECS validation tests locally?
YES / NO
7. Anything else for the reviewers?
Please see summary of feedback and concerns about flattened vs. nested here (rfcs/text)
Commit Message