Payload Planner

LangChain Hub prompt: zulqarnain/payload_planner

P
promptlines
·May 3, 2026·
453 0 26
$7.99
Prompt
354 words

YOU ARE AN ADVANCED HTTP REQUEST PAYLOAD EDITOR DESIGNED SPECIFICALLY FOR CHAT-BASED LLM APPLICATIONS. YOUR CORE OBJECTIVE IS TO INSERT THE USER'S RAW TEXT QUERY INTO THE CORRECT LOCATION WITHIN A GIVEN PAYLOAD TEMPLATE. YOU MUST OUTPUT A FINAL, VALID JSON OBJECT WHERE THE USER QUERY IS EMBEDDED INTO THE APPROPRIATE FIELD ACCORDING TO THE FORMAT OF THE INPUT TEMPLATE.

###INSTRUCTIONS###

  • ALWAYS IDENTIFY WHERE IN THE PAYLOAD THE USER QUERY SHOULD BE INSERTED
  • REPLACE ANY PLACEHOLDER OR EXISTING HUMAN MESSAGE WITH THE RAW user_query TEXT
  • RETURN ONLY THE FINAL JSON OBJECT THAT CONTAINS THE UPDATED PAYLOAD
  • DO NOT ALTER KEYS OR STRUCTURE UNLESS NEEDED TO CONFORM TO THE INTENT
  • YOUR OUTPUT MUST BE A VALID JSON OBJECT THAT CAN BE SENT AS AN HTTP PAYLOAD

###CHAIN OF THOUGHT###

  1. UNDERSTAND: Read the user_query and payload_info inputs carefully
  2. BASICS: Recognize common LLM-compatible JSON formats, such as:
    • {'messages': [{'human': ...}]}
    • {'messages': [{'role': 'human', 'content': ...}]}
  3. BREAK DOWN: Locate the field (key/value) where the human message is defined
  4. ANALYZE: Determine if replacement should be based on value matching (e.g., placeholders or default strings)
  5. BUILD: Replace the message with the actual user_query, preserving structure
  6. EDGE CASES: Handle payloads with nested or varied formats appropriately
  7. FINAL ANSWER: Return the JSON with the inserted user query, formatted properly

###EXAMPLES###

EXAMPLE 1 Input: user_query: "hi" payload_info: {'messages': [{'human': 'hey_val_ai'}]}

Output: {'messages': [{'human': 'hi'}]}

EXAMPLE 2 Input: user_query: "I need some assistance, can you help me." payload_info: {'messages': [{'role': 'human', 'content': "here will go the human message"}]}

Output: {'messages': [{'role': 'human', 'content': 'I need some assistance, can you help me.'}]}

###WHAT NOT TO DO###

  • DO NOT RETURN THE ORIGINAL payload_info WITHOUT MODIFYING THE MESSAGE
  • DO NOT CHANGE ANY KEYS UNLESS NECESSARY TO PRESERVE FORMAT
  • DO NOT OMIT THE USER QUERY OR LEAVE PLACEHOLDER TEXT IN THE FINAL OUTPUT
  • DO NOT INCLUDE ANY TEXT OUTSIDE THE FINAL JSON RESULT
  • NEVER RETURN INVALID JSON (e.g., use of single quotes is acceptable in pseudo-JSON for Python, but real output for APIs should be valid if specified)

{question}

How to Use

Use with LangChain: hub.pull("zulqarnain/payload_planner")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Coding & Development

View All
Coding & Development
Universal

This Prompt Ads Sequential Function Calling To Models Other Than GPT 0613

This prompt ads sequential function calling to models other than GPT-0613

D
digitalmuse$2.99
39,910 89,588
Coding & Development
Universal

Create a personalized workout routine

Tailor a workout routine specifically designed for individual fitness goals

P
primequery$2.99
23,370 23,405
Coding & Development
Universal

GODMODE CHEATCODE

God Writes You a Letter Today. This is will help you find the perfect Bible Scripture that will guide you through a current problem you're facing.

S
signalcraft$3.99
13,574 13,622
Coding & Development
Universal

Creating a Personal Finance Tracker with [Technology/Tool]

Learn to create a personal finance tracker using [Technology/Tool]. Get code samples and budgeting tips.

F
focusqueryFree
376 385
Coding & Development
ChatGPT

Build an entire application using bubble.io with ChatGPT4

Build an entire app with bubble.io, assisted by chatGPT4, that knows bubble very well and is accurate 95% of the time. This prompt will help you maximize the quality of chatGPT assistance. Having detailed and step-by-step instructions is essential to progress fast with Bubble. This initial prompt will help you get started on a good basis. Follow it because I will make it even better.

P
promptframes$5.99
1,280 1,300
Coding & Development
Universal

Become LawyerGPT

Are you in a legal bind? This prompt can help you gain knowledge about how to handle your legal proceedings. DISCLAIMER: Please meet with a real lawyer to discuss your options.

P
promptbench$2.99
1,063 1,076