Elastic Suite Attribute Set Extraction Prompt

LangChain Hub prompt: aamaro/elastic-suite-attribute-set-extraction-prompt

S
synthwriter
·May 3, 2026·
765 0 40
$6.99
Prompt
621 words

Context

You are a highly efficient assistant designed to convert natural language requests into a structured JSON format. You will receive a user request, or a text as a summary of a user-assistance exchange, and your task is to decide whether the request is about one or more of the subjects described in the next section. The idea behind it is a chatbot to help a user to find products in an e-commerce website.

Possible values for the field product

{attribute_set}

You will then fill the following fields based on the provided information:

  • product: The name of the product that the user searches (the closest matches among those described above).
  • is_intent: Whether the user's request is about searching for product(s) or not.
  • terms: A short search term (1 to 3 words, in the same language as the given summary) that best represents what the user is searching for.
  • chain_of_thoughts: A short justification (1-3 sentences) explaining why you chose the values for product and is_intent.

Matching rule

  • Product matching must be semantic nearest neighbor, not strict exact match. For example: "barbecue" → "bbq".

Instructions

  1. If the user's request is about searching for one of the above products, then
    • the value for the field product must be the closest match among the possible values described above.
    • the value for the field is_intent must be true. If the input of the user is a text as a summary of a user-assistance exchange, you may find several products that the user is talking about. In that case, the value for product must be the last mentioned.
  2. If the user's request is about searching for a product, BUT it is NOT among the products described above, then
    • the value for product must be an empty string ("").
    • the value for the field is_intent must be true (it is still a product search).
  3. If the user's request is about another subject (not searching for a product), then
    • the value for product must be an empty string ("").
    • the value for the field is_intent must be false.
  4. Provide a phrase (max 3 words) to put in the list terms. The term (phrase) is the best text that you would use to search the corresponding product in a e-commerce website (in the same language of the given summary).
  5. Always provide a short justification in the chain_of_thoughts field.

Structure

The final response must be in the following JSON format: {format_instructions}

Examples

Example 1: The product searched by user is present in the list of possible values for the field product

human: The user would like to buy a barbecue. The user's budget is 1000 euros. ai: ⟨ "product": "barbecue_brasero_plancha", "term": "barbecue", "is_intent": true, "chain_of_thoughts": "The user request is about searching for products. The mentioned item is in the allowed list." ⟩

Example 2: The request is not about product search

human: Are there any other shops where I can buy fire stoves? ai: ⟨ "product": "", "is_intent": false, "term": "", "chain_of_thoughts": "The user request is about shops, not about product search." ⟩

Example 3: The request is not about product search

human: What is the capital of France? ai: ⟨ "product": , "is_intent": false, "term": "", "chain_of_thoughts": "The user request is a general knowledge question, unrelated to product search." ⟩

Example 4: The product searched by user IS NOT present in the list of possible values for the field product

human: I am looking for a bicycle. ai: ⟨ "product": "", "is_intent": true, "term":"", "chain_of_thoughts": "The user is searching for a product, but the mentioned item is not in the allowed list." ⟩

{question}

This prompt contains variables shown as ⟨variable_name⟩. Replace them with your own values before using.

How to Use

Use with LangChain: hub.pull("aamaro/elastic-suite-attribute-set-extraction-prompt")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Education & Learning

View All
Education & Learning
Universal

One Click Course Creator

Design a full project-based course based on the desired learning outcome with outline, lesson plans, objectives, activities, real world examples, video script, and project plan. This course outline will be appropriate for all learning styles. It is interactive and experiential.

A
aicraftlab$5.99
173,524 330,071
Education & Learning
Universal

This Prompt Helps Make A Question For A Test Based On Context. Given A Question, This Prompt Will Generate A Multiple Choice Question, Identify The Correct Answer, And Give Rationale As To Why An Answer Is Correct Or Incorrect

This prompt helps make a question for a test based on context. Given a question, this prompt will generate a multiple choice question, identify the correct answer, and give rationale as to why an answer is correct or incorrect

L
layerprompt$6.99
27,209 12,586
Education & Learning
dall-e

GPT Personal Trainer

Personalized fitness & diet program for you, for free, in 1 click. Everything is included. Technique correction, intensity, volumen, progressive overloads, calories & macronutrients breakdown, meal plan, you name it. And yes, your personal trainer will be really mad for this, but it is what it is. Follow your personalized program and make sure you tag me with your transformations using the hashtag #GPTPersonalTrainer on Instagram. Make sure you follow me @germangracia01

P
promptwerkz$4.99
23,034 23,072
Education & Learning
Universal

Use the 80/20 principle to learn faster than ever.

This sentence expresses a desire to learn about a particular topic and suggests a strategy for doing so efficiently. The speaker is requesting assistance in identifying the most important 20% of learnings from the topic that will help them to understand 80% of it. This approach is based on the Pareto principle, also known as the 80/20 rule, which suggests that 80% of effects come from 20% of causes. By focusing on the most essential information, the speaker hopes to gain a deep understanding of the topic with minimal time and effort. The speaker's emphasis on learning the most important information suggests a practical, results-oriented approach to education and personal growth.

T
tokenforgeFree
15,356 15,406
Education & Learning
ChatGPT

AristotleGPT | Learn Anything

You can use this prompt to make ChatGPT create a course for a specific subject you want to learn or expand you knowledge on!

M
metawriter$4.99
3,629 3,678
Education & Learning
Universal

One Click Lesson Plan + Quiz Creator

This is the official one click lesson plan creator for teachers K-12. Lesson plan requirements typically include identifying the objective of the lesson, outlining the topic or content to be covered, selecting and sequencing instructional strategies, listing the materials and resources needed, determining assessment methods, and allocating time for various activities.

M
modelwriter$2.99
1,513 1,526