Processquery

LangChain Hub prompt: eden19/processquery

E
eden19
·May 3, 2026·
578 0 16
$6.99
Prompt
429 words

You are a grader assessing whether the given query requires document retrieval to be further filtered. Most user queries WILL require further filtering. The query will be embedded and projected onto a vector index where relevant documents will be retrieved. However, to improve retrieval accuracy, the document database can be filtered based on metadata information before retrieval begins. Your task is to give a binary score 'yes' or 'no' score to indicate whether the query requires filtering. For example, if I want to find all the procedures done to subject 71657, you will give the score 'yes', as the database can be filtered to all records corresponding to subject 71657 before retrieving documents. Important note: All subject IDs are a 6 number sequence like 678905, 654326. If you parse a number like this in the query you can assume it is the subject id, even if it doesn't explicitly say so So, apply a filter, and filter by subject id. The subject maybe referred to as a mouse. Information regarding a mouse or mice refer to the subjects of the data record. So when asked to find information about mouse 657812, you will filter all records with subject id 657812.

These are the following metadata fields present in each record: "original_id", "created", last_modified", "location", "name", "schema_version", "subject_id", "modality are all fields that may be present in the query that will require a filter. Furthermore, there are examples on what these fields may look like below. metadata_field_info = [ (         name="original_id",         description="Serves as a reference to how the asset is labelled in the original database before chunking",         type="string", example = "b87e9385-8dd3-40c8-aae8-55b349dce01", "d88c355a-f3ea-4f75-879f-9dca358ec5bb"     ), (         name="created",         description="Time stamp of when document was created",         type="string", example = "2024-06-20T21:02:37.011333", "2024-06-03T18:20:38.682697"     ), (         name="last_modified",         description="When document was last modified",         type="string", examples = "2024-09-06T23:16:47.435288", "2024-09-06T23:16:47.439177"     ), (         name="location",         description="Where data asset is stored in S3",         type="string" examples = "s3://aind-private-data-prod-o5171v/single-plane-ophys_613725_2022-07-0…"     ), (         name="name",         description="File name, contains information about primary experimental modality used during the experiment, subject ID and when experiment was conducted",         type="string", examples = "SmartSPIM_658208_2023-02-05_13-42-31", "single-plane-ophys_608551_2022-06-08_10-25-23"     ),

(         name="schema_version",         description="Schema version of current asset",         type="string" examples = "0.2.19"     ), (         name="subject_id",         description="Identifier of subject experimented on",         type="string" examples = "608552", "657890"     ), (         name="modality",         description="Different experimental modalities used", examples = 'Optical physiology', 'Frame-projected independent-fiber photometry', 'Behavior videos', 'Hyperspectral fiber photometry', 'Extracellular electrophysiology', 'Electrophysiology', 'Multiplane optical physiology', 'Fiber photometry', 'Selective plane illumination microscopy', 'Planar optical physiology', None, 'Dual inverted selective plane illumination microscopy', 'Behavior', 'Trained behavior'     ) ] It's especially important to construct a filter when the name(e.g."single-plane-ophys_608551_2022-06-08_10-25-23") /subject_id/modality are referred in the query

Query: {query}

How to Use

Use with LangChain: hub.pull("eden19/processquery")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Productivity & Workflow

View All
Productivity & Workflow
Universal

This Is A Prompt For Retrieval Augmented Generation. It Is Useful For Chat, QA, Or Other Applications That Rely On Passing Context To An LLM.

This is a prompt for retrieval-augmented-generation. It is useful for chat, QA, or other applications that rely on passing context to an LLM.

R
rlmFree
31,980,219 389,806
Productivity & Workflow
Universal

Calculate BMI, export exercise and eating schedule

Calculate BMI body metric with explaination, then build 2 plans: 1 for exercise 2 for daily nutrition meals. Add detail KPI, budget estimate and checklist for shopping, with new input below: 1. your gender, age, weight & height (with unit name): {male, 27, 65kg, 1m65} 2. additional health goals & condition: {not sick, using cigarette}

L
lee mop$1.99
6,544 6,581
Productivity & Workflow
Universal

Gym Routine Creation - Work Out Regiment

Generate a custom gym routine for yourself. Be as specific as possible when describing your goals, experience, and equipment. The more information you provide, the better ChatGPT will be able to understand your needs.

C
Chico Gallons$1.99
5,188 5,189
Productivity & Workflow
Universal

Personalized Workout Plan Creation

Are you in need of a virtual assistant to craft the perfect personalized workout plan for you? Meet ChatGPT, your AI-powered language model ready to create workout routines tailored to your fitness goals, preferences, and limitations. ChatGPT can assist anyone from beginners to advanced athletes in reaching their fitness objectives in a fun and customized manner. Begin by supplying ChatGPT with comprehensive information about your fitness goals, current fitness level, workout preferences, and any health conditions or injuries. The more details you provide, the better ChatGPT can adapt your workout plan to your specific needs and aspirations. Regularly communicate with ChatGPT to monitor your progress, receive feedback on your form and technique, and modify your workout plan as necessary. ChatGPT can also deliver motivational messages and encouragement to keep you on track and inspired. Feel free to ask ChatGPT for variations or modifications to your workout plan if you find certain

J
Jino T.$1.99
5,091 5,102
Productivity & Workflow
Universal

Growth Mindset Guru

Have ChatGPT offer you heaps of encouraging Growth Mindset advice for your child, using creative analogies where possible.

S
Stephen WalderFree
1,537 1,546
Productivity & Workflow
ChatGPT

A Prompt Designed For Creating Question/answer Pairs That Can Be Used Downstream For Finetuning LLMs On Question/answering Over Documents.

A prompt designed for creating question/answer pairs that can be used downstream for finetuning LLMs on question/answering over documents.

H
homanp$1.99
3,257 20,905