Skip to content

Conversation

@seanstory
Copy link
Member

@seanstory seanstory commented Jul 21, 2025

Note: I never put this through review, and am unsure if increasing the default here would cause any significant or nuanced issues.

I did this work with the intent to evaluate how much increased field-level meta (for descriptions) would help an LLM in picking which indices should be searched, given a natural language prompt. Unfortunately, it became clear quite quickly that this approach wouldn't scale. Even just sending 20 index mappings with no metadata was too much for the EIS LLM to process in a single message context.

Instead, I'm taking an approach outlined in elastic/kibana#232437, to attempt to improve our index selection via top-level descriptions and/or a flat listing of field names.

We may revisit this topic, but it's probably important first to explore making index metadata searchable, before worrying about expanding how much index metadata we can even set.

to use this PR

  1. ./gradlew localDistro
  2. set the elasticsearch.yml with:
    xpack:
      inference:
        elastic:
          url: "http://localhost:8443"
      license:
        self_generated:
          type: trial
      security:
        enabled: true
    
  3. set elasticsearch passwords with:
    bin/elasticsearch-setup-passwords interactive <<EOF
    Y
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    changeme
    EOF
    
  4. set the index settings on an index template:
    curl -X PUT -u elastic:changeme \
      -H "Content-Type: application/json" \
      "http://localhost:9200/_index_template/default-meta-limit" \
      -d '{
        "index_patterns": ["<your indices here>"],
        "priority": 5000,
        "template": {
          "settings": {
            "index.mapping.meta.length_limit": 800
          }
        }
      }'
    
  5. Run evaluations/experiments

@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2025

🔍 Preview links for changed docs

@cla-checker-service
Copy link

cla-checker-service bot commented Jul 21, 2025

💚 CLA has been signed

@seanstory seanstory force-pushed the seanstory/increase-mapping-field-meta-char-limit branch from 0b6ef47 to 8e02715 Compare July 21, 2025 17:00
@seanstory seanstory force-pushed the seanstory/increase-mapping-field-meta-char-limit branch from cdbb14f to 73b7ba2 Compare August 20, 2025 16:38
@seanstory seanstory closed this Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants