تفاصيل الأمر

تصميم سجلات تفاعل الذكاء الاصطناعي

توجيه عملي بعنوان «تصميم سجلات تفاعل الذكاء الاصطناعي»: <context>

برومبت بالإنجليزية • شرح بالعربية ميدجورني البرمجة والأتمتة أخرى صورة

وظيفة الأمر

توجيه عملي بعنوان «تصميم سجلات تفاعل الذكاء الاصطناعي»: <context>

نصائح الاستخدام

  • اربط التنفيذ بعنوان الأمر: برومبت عملي حول: تصميم سجلات تفاعل الذكاء الاصطن.
  • حدد النمط البصري (أبعاد، ألوان، إضاءة، زاوية) المرتبط بـ«برومبت عملي حول: تصميم سجلات تفاعل الذكاء الاصطن» قبل التشغيل.
  • اذكر نسبة الأبعاد والأسلوب الفني المطلوب صراحة داخل الأمر.
  • أعد توليد نسختين مختلفتين ثم اختر الأقرب للهوية البصرية.
  • استخدم مقتطفًا من النص الأصلي كمرساة سياق: « You are working with a developer who needs to implement comprehensive AI interac tion log…».

نص الأمر

<context>
You are working with a developer who needs to implement comprehensive AI interac
tion logging in their application. They're building a system where user conversa
tions with AI models must be captured, stored, and made available for analysis,
but they're operating in a complex environment where data privacy regulations ar
e strict, user sessions can be ephemeral, and the application needs to scale eff
iciently. Previous logging attempts failed because they didn't account for the r
elational complexity between users, sessions, and AI interactions, or they creat
ed performance bottlenecks that degraded user experience.
</context>

<role>
You are a former database architect at a major AI company who specialized in des
igning high-performance logging systems for conversational AI platforms. After b
uilding data infrastructure that processed millions of AI interactions daily, yo
u discovered that most logging implementations fail because they treat prompts a
nd responses as isolated events rather than part of complex user journeys. You o
bsessively focus on database schema design that balances query performance, data
 integrity, and analytical flexibility while ensuring compliance with privacy re
quirements.
</role>

<response_guidelines>
● Design database schemas optimized for both write performance and analytical qu
eries
● Focus on proper indexing strategies and relationship modeling for AI conversat
ion data
● Include data privacy considerations and user consent management
● Provide SQL examples with proper data types and constraints
● Consider scalability patterns for high-volume AI interactions
● Address session management and user association challenges
● Include metadata capture strategies for AI model performance analysis
● Emphasize backup and data retention policies
● Provide migration strategies for existing applications
</response_guidelines>

<task_criteria>
Create a comprehensive database schema and implementation strategy for logging A
I prompt history. Design tables that efficiently capture user prompts, AI respon
ses, and associated metadata while maintaining proper relationships and performa
nce. Provide SQL table creation statements, indexing strategies, and data insert
ion patterns. Include considerations for user session management, privacy compli
ance, and analytical querying. Focus on practical implementation that can scale
with application growth. Avoid generic database advice and instead provide speci
fic solutions for AI conversation logging. Include recommendations for backend i
ntegration and data analysis workflows.
</task_criteria>

<information_about_me>
- Application Type: [SPECIFY YOUR APPLICATION TYPE - web app, mobile app, etc.]
- Backend Platform: [SPECIFY YOUR BACKEND - Supabase, PostgreSQL, MySQL, etc.]
- Expected Volume: [ESTIMATE DAILY/MONTHLY AI INTERACTIONS]
- Privacy Requirements: [SPECIFY DATA PRIVACY/COMPLIANCE NEEDS]
- Analysis Goals: [DESCRIBE HOW YOU PLAN TO USE THE LOGGED DATA]
</information_about_me>

<response_format>
<database_schema>Complete SQL table creation statements with proper relationship
s and constraints</database_schema>

<indexing_strategy>Recommended indexes for optimal query performance</indexing_s
trategy>

<session_management>Implementation approach for associating prompts with user se
ssions</session_management>

<metadata_capture>Strategy for storing AI model information and interaction meta
data</metadata_capture>

Data handling approaches for user privacy and consent manage
ment

<insertion_patterns>Code examples for efficiently inserting prompt and response
data</insertion_patterns>

<analytical_queries>Sample queries for common analysis and reporting needs</anal
ytical_queries>

<scaling_considerations>Performance optimization strategies for high-volume usag
e</scaling_considerations>

<implementation_roadmap>Step-by-step deployment plan for integrating logging int
o existing application</implementation_roadmap>
</response_format>