vkovalskii

Untitled

Sep 1st, 2025
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.78 KB | None | 0 0
  1. {
  2. "messages": [
  3. {
  4. "role": "system",
  5. "content": "You are an expert researcher with adaptive planning and Schema-Guided Reasoning capabilities.\n\nUSER REQUEST EXAMPLE: \"Plan in detail how you would look for the price of a BMW in Russia in 2025 for a new X6 and complete it\"\n↑ IMPORTANT: Detect the language from this request and use THE SAME LANGUAGE for all responses, searches, and reports.\n\nCORE PRINCIPLES:\n1. CLARIFICATION FIRST: For ANY uncertainty - ask clarifying questions\n2. DO NOT make assumptions - better ask than guess wrong\n3. Adapt plan when new data conflicts with initial assumptions\n4. Search queries in SAME LANGUAGE as user request\n5. REPORT ENTIRELY in SAME LANGUAGE as user request\n6. Every fact in report MUST have inline citation [1], [2], [3] integrated into sentences\n\nWORKFLOW:\n0. clarification (HIGHEST PRIORITY) - when request unclear\n1. generate_plan - create research plan\n2. web_search - gather information (2-3 searches MAX)\n3. adapt_plan - adapt when conflicts found\n4. create_report - create detailed report with ci... (truncated 263 chars)"
  6. },
  7. {
  8. "role": "user",
  9. "content": "Plan in detail how you would look for the price of a BMW in Russia in 2025 for a new X6 and complete it"
  10. },
  11. {
  12. "role": "system",
  13. "content": "\nORIGINAL USER REQUEST: 'Plan in detail how you would look for the price of a BMW in Russia in 2025 for a new X6 and complete it'\n(Use this for language consistency)\nSEARCHES COMPLETED: 0 (MAX 3-4 searches)"
  14. },
  15. {
  16. "role": "assistant",
  17. "content": "Conduct web searches to gather data on current BMW X6 prices in Russia.",
  18. "tool_calls": [
  19. {
  20. "type": "function",
  21. "id": "step_1",
  22. "function": {
  23. "name": "generate_plan",
  24. "arguments": "{\"tool\":\"generate_plan\",\"reasoning\":\"To accurately predict the price of a BMW X6 in Russia in 2025, I need to gather data on current prices, economic trends, and automotive industry forecasts. This will help in making an informed prediction.\",\"research_goal\":\"Predict the price of a BMW X6 in Russia for the year 2025.\",\"planned_steps\":[\"Search for current BMW X6 prices in Russia.\",\"Research economic forecasts for Russia up to 2025.\",\"Investigate automotive industry trends and forecasts for 2025.\",\"Analyze data to predict the 2025 price of BMW X6 in Russia.\"],\"search_strategies\":[\"Use Russian automotive websites to find current BMW X6 prices.\",\"Search for economic forecasts for Russia from credible financial sources.\",\"Look for automotive industry reports and forecasts for 2025.\"]}"
  25. }
  26. }
  27. ]
  28. },
  29. {
  30. "role": "tool",
  31. "content": "{\"research_goal\": \"Predict the price of a BMW X6 in Russia for the year 2025.\", \"planned_steps\": [\"Search for current BMW X6 prices in Russia.\", \"Research economic forecasts for Russia up to 2025.\", \"Investigate automotive industry trends and forecasts for 2025.\", \"Analyze data to predict the 2025 price of BMW X6 in Russia.\"], \"search_strategies\": [\"Use Russian automotive websites to find current BMW X6 prices.\", \"Search for economic forecasts for Russia from credible financial sources.\", \"Look for automotive industry reports and forecasts for 2025.\"], \"created_at\": \"2025-09-02T07:06:06.387671\"}",
  32. "tool_call_id": "step_1"
  33. },
  34. {
  35. "role": "system",
  36. "content": "\nORIGINAL USER REQUEST: 'Plan in detail how you would look for the price of a BMW in Russia in 2025 for a new X6 and complete it'\n(Use this for language consistency)\nSEARCHES COMPLETED: 0 (MAX 3-4 searches)"
  37. },
  38. {
  39. "role": "assistant",
  40. "content": "Search for current BMW X6 prices in Russia.",
  41. "tool_calls": [
  42. {
  43. "type": "function",
  44. "id": "step_2",
  45. "function": {
  46. "name": "web_search",
  47. "arguments": "{\"tool\":\"web_search\",\"reasoning\":\"I need to find the current price of a BMW X6 in Russia to establish a baseline for future price predictions.\",\"query\":\"текущая цена BMW X6 в России 2023\",\"max_results\":5,\"plan_adapted\":false,\"scrape_content\":true}"
  48. }
  49. }
  50. ]
  51. },
  52. {
  53. "role": "tool",
  54. "content": "\nFOUND 5 SOURCES:\n[1] BMW X6 2023 купить в Москве, цена от 12212000\n Content: это премиальный кроссовер-купе с динамичным стилем и современным оснащением. Доступны три версии: BMW X6 xDrive30i M Sport, BMW X6...\n URL: https://e-n-cars.ru/product/bmw-x6-2023/\n\n[2] Купить БМВ Х6 2023 в России: продажа BMW X6 ...\n Content: 48 объявлений о продаже БМВ Х6 2023 б/у и новых в России от 9 550 000 рублей – частные объявления. Узнать стоимость BMW X6 2023 года и купить с пробегом на...\n URL: https://auto.drom.ru/bmw/x6/year-2023/suv/\n\n[3] Купить новый автомобиль BMW X6 2023 года выпуска\n Content: Новые BMW X6 2023 года от официальных дилеров от 12 990 000 рублей — ознакомьтесь с полным модельным рядом, ценами и комплектациями. ООО «Сервисы размещения...\n URL: https://auto.ru/cars/bmw/x6/2023-year/new/\n\n[4] Купить BMW X6 с пробегом 2023 года выпуска\n Content: Купить BMW X6 с пробегом 2023 года выпуска ; Без пробега по РФ. 11 800 000 ₽. 7 480 км · Роман ; Без пробега по РФ. 11... (truncated 373 chars)",
  55. "tool_call_id": "step_2"
  56. },
  57. {
  58. "role": "system",
  59. "content": "\nORIGINAL USER REQUEST: 'Plan in detail how you would look for the price of a BMW in Russia in 2025 for a new X6 and complete it'\n(Use this for language consistency)\nSEARCHES COMPLETED: 1 (MAX 3-4 searches)\n\nAVAILABLE SOURCES FOR CITATIONS:\n[1] BMW X6 2023 купить в Москве, цена от 12212000 - https://e-n-cars.ru/product/bmw-x6-2023/\n[2] Купить БМВ Х6 2023 в России: продажа BMW X6 ... - https://auto.drom.ru/bmw/x6/year-2023/suv/\n[3] Купить новый автомобиль BMW X6 2023 года выпуска - https://auto.ru/cars/bmw/x6/2023-year/new/\n[4] Купить BMW X6 с пробегом 2023 года выпуска - https://auto.ru/cars/bmw/x6/2023-year/used/\n[5] Купить BMW X6 из Кореи с аукциона без пробега по РФ - https://autosender.ru/korean-cars/bmw/x6\n\nUSE THESE EXACT NUMBERS [1], [2], [3] etc. in your report citations."
  60. }
  61. ],
  62. "model": "gpt-4o",
  63. "max_tokens": 8000,
  64. "response_format": {
  65. "type": "json_schema",
  66. "json_schema": {
  67. "schema": {
  68. "$defs": {
  69. "AdaptPlan": {
  70. "description": "Adapt research plan based on new findings",
  71. "properties": {
  72. "tool": {
  73. "const": "adapt_plan",
  74. "title": "Tool",
  75. "type": "string"
  76. },
  77. "reasoning": {
  78. "description": "Why plan needs adaptation based on new data",
  79. "title": "Reasoning",
  80. "type": "string"
  81. },
  82. "original_goal": {
  83. "description": "Original research goal",
  84. "title": "Original Goal",
  85. "type": "string"
  86. },
  87. "new_goal": {
  88. "description": "Updated research goal",
  89. "title": "New Goal",
  90. "type": "string"
  91. },
  92. "plan_changes": {
  93. "description": "Specific changes made to plan",
  94. "items": {
  95. "type": "string"
  96. },
  97. "maxItems": 3,
  98. "minItems": 1,
  99. "title": "Plan Changes",
  100. "type": "array"
  101. },
  102. "next_steps": {
  103. "description": "Updated remaining steps",
  104. "items": {
  105. "type": "string"
  106. },
  107. "maxItems": 4,
  108. "minItems": 2,
  109. "title": "Next Steps",
  110. "type": "array"
  111. }
  112. },
  113. "required": [
  114. "tool",
  115. "reasoning",
  116. "original_goal",
  117. "new_goal",
  118. "plan_changes",
  119. "next_steps"
  120. ],
  121. "title": "AdaptPlan",
  122. "type": "object",
  123. "additionalProperties": false
  124. },
  125. "Clarification": {
  126. "description": "Ask clarifying questions when facing ambiguous requests",
  127. "properties": {
  128. "tool": {
  129. "const": "clarification",
  130. "title": "Tool",
  131. "type": "string"
  132. },
  133. "reasoning": {
  134. "description": "Why clarification is needed",
  135. "title": "Reasoning",
  136. "type": "string"
  137. },
  138. "unclear_terms": {
  139. "description": "List of unclear terms or concepts",
  140. "items": {
  141. "type": "string"
  142. },
  143. "maxItems": 5,
  144. "minItems": 1,
  145. "title": "Unclear Terms",
  146. "type": "array"
  147. },
  148. "assumptions": {
  149. "description": "Possible interpretations to verify",
  150. "items": {
  151. "type": "string"
  152. },
  153. "maxItems": 4,
  154. "minItems": 2,
  155. "title": "Assumptions",
  156. "type": "array"
  157. },
  158. "questions": {
  159. "description": "3-5 specific clarifying questions",
  160. "items": {
  161. "type": "string"
  162. },
  163. "maxItems": 5,
  164. "minItems": 3,
  165. "title": "Questions",
  166. "type": "array"
  167. }
  168. },
  169. "required": [
  170. "tool",
  171. "reasoning",
  172. "unclear_terms",
  173. "assumptions",
  174. "questions"
  175. ],
  176. "title": "Clarification",
  177. "type": "object",
  178. "additionalProperties": false
  179. },
  180. "CreateReport": {
  181. "description": "Create comprehensive research report with citations",
  182. "properties": {
  183. "tool": {
  184. "const": "create_report",
  185. "title": "Tool",
  186. "type": "string"
  187. },
  188. "reasoning": {
  189. "description": "Why ready to create report now",
  190. "title": "Reasoning",
  191. "type": "string"
  192. },
  193. "title": {
  194. "description": "Report title",
  195. "title": "Title",
  196. "type": "string"
  197. },
  198. "user_request_language_reference": {
  199. "description": "Copy of original user request to ensure language consistency",
  200. "title": "User Request Language Reference",
  201. "type": "string"
  202. },
  203. "content": {
  204. "description": "\n DETAILED technical content (800+ words) with in-text citations.\n\n 🚨 CRITICAL LANGUAGE REQUIREMENT 🚨:\n - WRITE ENTIRELY IN THE SAME LANGUAGE AS user_request_language_reference\n - If user_request_language_reference is in Russian → WRITE IN RUSSIAN\n - If user_request_language_reference is in English → WRITE IN ENGLISH\n - DO NOT mix languages - use ONLY the language from user_request_language_reference\n\n OTHER REQUIREMENTS:\n - Include in-text citations for EVERY fact using [1], [2], [3] etc.\n - Citations must be integrated into sentences, not separate\n - Example Russian: \"Apple M5 использует 3нм процесс [1], что улучшает производительность [2].\"\n - Example English: \"Apple M5 uses 3nm process [1] which improves performance [2].\"\n\n Structure:\n 1. Executive Summary / Исполнительное резюме\n 2. Technical Analysis / Технический анализ (with citations)\n 3. Key Findings / Ключевые выводы\n 4. Conclusions / Заключения\n\n 🚨 LANGUAGE COMPLIANCE: Text... (truncated 62 chars)",
  205. "title": "Content",
  206. "type": "string"
  207. },
  208. "confidence": {
  209. "description": "Confidence in findings",
  210. "enum": [
  211. "high",
  212. "medium",
  213. "low"
  214. ],
  215. "title": "Confidence",
  216. "type": "string"
  217. }
  218. },
  219. "required": [
  220. "tool",
  221. "reasoning",
  222. "title",
  223. "user_request_language_reference",
  224. "content",
  225. "confidence"
  226. ],
  227. "title": "CreateReport",
  228. "type": "object",
  229. "additionalProperties": false
  230. },
  231. "GeneratePlan": {
  232. "description": "Generate research plan based on clear user request",
  233. "properties": {
  234. "tool": {
  235. "const": "generate_plan",
  236. "title": "Tool",
  237. "type": "string"
  238. },
  239. "reasoning": {
  240. "description": "Justification for research approach",
  241. "title": "Reasoning",
  242. "type": "string"
  243. },
  244. "research_goal": {
  245. "description": "Primary research objective",
  246. "title": "Research Goal",
  247. "type": "string"
  248. },
  249. "planned_steps": {
  250. "description": "List of 3-4 planned steps",
  251. "items": {
  252. "type": "string"
  253. },
  254. "maxItems": 4,
  255. "minItems": 3,
  256. "title": "Planned Steps",
  257. "type": "array"
  258. },
  259. "search_strategies": {
  260. "description": "Information search strategies",
  261. "items": {
  262. "type": "string"
  263. },
  264. "maxItems": 3,
  265. "minItems": 2,
  266. "title": "Search Strategies",
  267. "type": "array"
  268. }
  269. },
  270. "required": [
  271. "tool",
  272. "reasoning",
  273. "research_goal",
  274. "planned_steps",
  275. "search_strategies"
  276. ],
  277. "title": "GeneratePlan",
  278. "type": "object",
  279. "additionalProperties": false
  280. },
  281. "ReportCompletion": {
  282. "description": "Complete research task",
  283. "properties": {
  284. "tool": {
  285. "const": "report_completion",
  286. "title": "Tool",
  287. "type": "string"
  288. },
  289. "reasoning": {
  290. "description": "Why research is now complete",
  291. "title": "Reasoning",
  292. "type": "string"
  293. },
  294. "completed_steps": {
  295. "description": "Summary of completed steps",
  296. "items": {
  297. "type": "string"
  298. },
  299. "maxItems": 5,
  300. "minItems": 1,
  301. "title": "Completed Steps",
  302. "type": "array"
  303. },
  304. "status": {
  305. "description": "Task completion status",
  306. "enum": [
  307. "completed",
  308. "failed"
  309. ],
  310. "title": "Status",
  311. "type": "string"
  312. }
  313. },
  314. "required": [
  315. "tool",
  316. "reasoning",
  317. "completed_steps",
  318. "status"
  319. ],
  320. "title": "ReportCompletion",
  321. "type": "object",
  322. "additionalProperties": false
  323. },
  324. "WebSearch": {
  325. "description": "Search for information with credibility focus",
  326. "properties": {
  327. "tool": {
  328. "const": "web_search",
  329. "title": "Tool",
  330. "type": "string"
  331. },
  332. "reasoning": {
  333. "description": "Why this search is needed and what to expect",
  334. "title": "Reasoning",
  335. "type": "string"
  336. },
  337. "query": {
  338. "description": "Search query in same language as user request",
  339. "title": "Query",
  340. "type": "string"
  341. },
  342. "max_results": {
  343. "default": 10,
  344. "description": "Maximum results (1-15)",
  345. "title": "Max Results",
  346. "type": "integer"
  347. },
  348. "plan_adapted": {
  349. "default": false,
  350. "description": "Is this search after plan adaptation?",
  351. "title": "Plan Adapted",
  352. "type": "boolean"
  353. },
  354. "scrape_content": {
  355. "description": "Fetch full page content for deeper analysis",
  356. "title": "Scrape Content",
  357. "type": "boolean"
  358. }
  359. },
  360. "required": [
  361. "tool",
  362. "reasoning",
  363. "query",
  364. "max_results",
  365. "plan_adapted",
  366. "scrape_content"
  367. ],
  368. "title": "WebSearch",
  369. "type": "object",
  370. "additionalProperties": false
  371. }
  372. },
  373. "description": "SGR Core - Determines next reasoning step with adaptive planning",
  374. "properties": {
  375. "reasoning_steps": {
  376. "description": "Step-by-step reasoning process leading to decision",
  377. "items": {
  378. "type": "string"
  379. },
  380. "maxItems": 4,
  381. "minItems": 2,
  382. "title": "Reasoning Steps",
  383. "type": "array"
  384. },
  385. "current_situation": {
  386. "description": "Current research situation analysis",
  387. "title": "Current Situation",
  388. "type": "string"
  389. },
  390. "plan_status": {
  391. "description": "Status of current plan execution",
  392. "title": "Plan Status",
  393. "type": "string"
  394. },
  395. "searches_done": {
  396. "default": 0,
  397. "description": "Number of searches completed (MAX 3-4 searches)",
  398. "title": "Searches Done",
  399. "type": "integer"
  400. },
  401. "enough_data": {
  402. "default": false,
  403. "description": "Sufficient data for report? (True after 2-3 searches)",
  404. "title": "Enough Data",
  405. "type": "boolean"
  406. },
  407. "remaining_steps": {
  408. "description": "1-3 remaining steps to complete task",
  409. "items": {
  410. "type": "string"
  411. },
  412. "maxItems": 3,
  413. "minItems": 1,
  414. "title": "Remaining Steps",
  415. "type": "array"
  416. },
  417. "task_completed": {
  418. "description": "Is the research task finished?",
  419. "title": "Task Completed",
  420. "type": "boolean"
  421. },
  422. "function": {
  423. "anyOf": [
  424. {
  425. "$ref": "#/$defs/Clarification"
  426. },
  427. {
  428. "$ref": "#/$defs/GeneratePlan"
  429. },
  430. {
  431. "$ref": "#/$defs/WebSearch"
  432. },
  433. {
  434. "$ref": "#/$defs/AdaptPlan"
  435. },
  436. {
  437. "$ref": "#/$defs/CreateReport"
  438. },
  439. {
  440. "$ref": "#/$defs/ReportCompletion"
  441. }
  442. ],
  443. "title": "Function"
  444. }
  445. },
  446. "required": [
  447. "reasoning_steps",
  448. "current_situation",
  449. "plan_status",
  450. "searches_done",
  451. "enough_data",
  452. "remaining_steps",
  453. "task_completed",
  454. "function"
  455. ],
  456. "title": "NextStep",
  457. "type": "object",
  458. "additionalProperties": false
  459. },
  460. "name": "NextStep",
  461. "strict": true
  462. }
  463. },
  464. "stream": true,
  465. "temperature": 0.2
  466. }
Advertisement
Add Comment
Please, Sign In to add comment