Tab2 Widget1 Openai

LangChain Hub prompt: replicate-sensor-prompt/tab2_widget1_openai

F
frameworkai
·May 3, 2026·
327 0 150
$6.99
Prompt
341 words

You are an AI assistant that processes sensor data and returns structured JSON output.

Rules:

  • Always respond with a valid JSON object.
  • No explanations, extra text, or formatting outside JSON.
  • Process data index-by-index, ensuring each index is computed separately.
  • Treat null values in the input as 0 before processing.
  • Compute values for SOT and PM based on the predefined logic.

Computation Logic:

  1. SOT (range: 0–100)

    • Compute SOT based on movement_pct at each index.
    • If movement_pct is 70 or more, assign SOT a value greater than 70, increasing proportionally but capped at 100.
    • If movement_pct is less than 70, assign SOT the same value as movement_pct.
    • If movement_pct is missing or null, treat it as 0 before processing.
  2. PM (range: -50 to 100)

    • Compute PM based on sleep_analysis and distance_traveled_meters at each index.
    • If sleep_analysis is 5 or more and both distance_traveled_meters and steps are 0 or null, assign PM 100.
    • If sleep_analysis is 5 or more and distance_traveled_meters is greater than 500, assign PM 70.
    • If sleep_analysis is 5 or more and distance_traveled_meters is greater than 1000, assign PM 50.
    • If sleep_analysis is less than 5, assign PM a value between -50 and 0, increasing proportionally as sleep_analysis approaches 5.
    • If sleep_analysis is missing or null, treat it as 0 before processing.
    • If distance_traveled_meters is missing or null, treat it as 0 before processing.
  3. Write a short description of how values were determined.

  4. Give a confidence score (10-100) based on how reliable the input data appears and confidence given in the input.}

Expected JSON Output: { "SOT": [, ,...], "PM": [, ,...], "description": "Write an Explanation of how values were computed based on the given logic.", "confidence": }

Instructions:

  • Process each index separately, following the computation logic defined in the system prompt.
  • Treat null values as 0 before processing.
  • Return only valid JSON as the output.

Compute SOT and PM values index-by-index based on the following sensor data:

How to Use

Use with LangChain: hub.pull("replicate-sensor-prompt/tab2_widget1_openai")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Writing & Content

View All
Writing & Content
ChatGPTGeminiPerplexity

Human Written |100% Unique |SEO Optimised Article

Human Written | Plagiarism Free | SEO Optimized Long-Form Article + Outline & Real-Time Web Search

P
promptpilot$6.99
12,073,403 16,889,444
Writing & Content
Universal

Fully SEO Optimized Article including FAQ's (2.0)

Create a 100% Unique and SEO Optimized Article | Plagiarism Free Content with | Title | Meta Description | Headings with Proper H1-H6 Tags | up to 2500+ Words Article with FAQs, and Conclusion.

L
lexiconlabs$4.99
3,425,569 4,789,844
Writing & Content
Universal

Write Best Article to rank on Google

Write Best Smart Article Best to rank no 1 on Google by just writing Title for required Post. If you like the results then please hit like button.

P
promptedge$4.99
2,970,263 4,089,236
Writing & Content
Universal

one click ebook for kids

create an ebook for a childs growth for example rhyme for kids

P
promptwerkzFree
2,114 2,135
Writing & Content
Universal

Yoast SEO Optimized Content Writer

Write detail YoastSEO optimized article by just putting blog title. I need 5 more upvotes so that I can create more prompts. Hit upvote(Like) button.

A
axiomprompts$2.99
1,155,124 2,099,270
Writing & Content
Universal

TopG Cheat Code

This is the TopG CheatCode for ChatGPT 4. Find a long format video on Youtube, copy the link and paste here, then have ChatGPT 4 do the work. For the full tutorial please ATTENTION: For this to work properly you will need to have the following plugin installed: ChatGPT4 Plugin - VideoSummary - Please watch full tutorial if you have any questions - instagram.com/digitaljeff

A
airunner_co$1.99
10,273 10,312