رجوع للكتالوج
H33البيانات

استعلام قواعد البيانات بلغة طبيعية

يخلّي غير المحلّلين يسألون أسئلة بيانات بإنجليزية بسيطة ويحصّلون إجابات من مستودع بيانات الشركة أو قاعدة تقاريرها. يترجم السؤال لاستعلام، ويشغّله، ويعرض النتيجة مع الأرقام الأساسية والـ SQL خلفها. يختلف عن text-to-SQL العام لأن النمط يشتغل مقابل نموذج بيانات الشركة الفعلي بدلالات موثّقة — يعرف وش يعني “عميل نشط” في شغلك، مو وش ممكن يعني “عميل نشط” عموماً. يرفض أسئلة ما يقدر يبنيها على المخطّط، ويبرز عدم اليقين بدل التخمين. قيمة النمط طيّ حلقة “بسأل فريق البيانات وأسمع منهم الأسبوع الجاي” لشي يصير في الاجتماع اللي طلع فيه السؤال.

وين يناسب
أشكال الأعمال
خدمات بين الشركاتشركة منتجاتمنصة/سوق طرفين
عتبة الحجم
تحت 20 data questions per week بالشهر، الاسترداد نادراً يبرّر البناء. الأنماط بهالشكل تسدّد بثبات عند 200+.
يناسب أكثر
الشركات اللي عندها مستودع بيانات حقيقي ومستخدمو أعمال ينتظرون المحلّلين.
الاسترداد · 6-12 شهرالبناء · متوسط–مرتفعالقيمة · $40k-$180kمتى · عنده مستودع بيانات
وضع الفشل اللي تصمّم حوله
SQL خاطئ ينتج جواباً خاطئاً بصياغة واثقة ← كشف “ورّني الـ SQL” إلزامي.
المتطلبات · 7 مطلوب

المتطلبات تصف قدرات يحتاجها النمط في بيئتك، مو الموردين اللي لازم تشتريهم. أي نظام يملأ متطلباً يحقّقه — وهذا اللي يخلّي الكتالوج قابلاً للنقل عبر الذيل الطويل من أدوات الشركات الصغيرة والمتوسطة.

  1. queryable_data_store
    مطلوبقراءةطلب

    The structured data warehouse, BI database, or curated tables the pattern queries against.

    شكل البيانات
    Tables and views with documented schemas, joinable relationships, indexed columns. Must be query-performant for ad-hoc analysis.
    يُملأ عادةً بواسطة
    • data warehouse with curated marts
    • BI database with denormalized reporting tables
    • operational database with read replica for analytical queries
  2. semantic_layer_documentation
    مطلوبقراءةمجموعة

    What things actually mean in this business. The single most important component: without explicit semantics, the pattern guesses and gets it wrong.

    شكل البيانات
    Per-table and per-column: business definition, computation rules, valid values, joins, owner. Per-metric: how computed, what it includes/excludes.
    يُملأ عادةً بواسطة
    • semantic layer in the BI tool
    • structured data dictionary maintained by the data team
    • metric definitions library
    • dbt model documentation
  3. user_query_surface
    مطلوبقراءة + كتابةطلب

    Where users ask their questions, in their working environment.

    شكل البيانات
    Natural language question with user identity for permissions and context.
    يُملأ عادةً بواسطة
    • chat bot for data questions
    • search bar in the BI tool
    • embedded query interface in the company portal
    • browser extension for the data team
  4. permission_resolver
    مطلوبقراءةطلب

    What data the asking user is allowed to see. Critical: permissions are not an afterthought, they're a constraint on every query.

    شكل البيانات
    Per-user-per-table or per-user-per-row-filter permission lookup.
    يُملأ عادةً بواسطة
    • data warehouse row-level security
    • BI tool permission model
    • explicit permission groups maintained by the data team
  5. answer_destination
    مطلوبكتابةطلب

    Where the answer goes back to the user with the result, the query, and the trail.

    شكل البيانات
    Answer with computed result, visualization where appropriate, the executed query for inspection, links to the data lineage.
    يُملأ عادةً بواسطة
    • chat reply with embedded chart and expandable query
    • answer panel in the BI tool
    • dedicated result view linked from the asker's working tools
  6. query_audit_log
    مطلوبكتابةحدث

    Every query the pattern runs gets logged for audit, performance review, and learning.

    شكل البيانات
    Per-query: user, question, generated query, result summary, execution time, any errors or fallbacks.
    يُملأ عادةً بواسطة
    • query log in the data platform
    • structured audit trail in the data warehouse
    • compliance archive of data access
  7. answer_feedback_loop
    مطلوبقراءة + كتابةحدث

    How users confirm or correct the pattern's interpretation, used to tune the semantic layer and the query generation.

    شكل البيانات
    Per-answer: was it right, was the interpretation correct, what should it have been instead.
    يُملأ عادةً بواسطة
    • thumbs widget after each answer with correction interface
    • weekly review with the data team of low-confidence answers
    • structured feedback capture in the answer destination
سير التشغيل · 8 خطوة
  1. 01
    User asks a question through the query surface
    user_query_surface
  2. 02
    Resolve user permissions to scope the question
    permission_resolver
  3. 03
    Match question to semantic layer: which entities, metrics, time ranges, segments
    semantic_layer_documentation
  4. 04
    Generate query with full schema awareness; if uncertain about interpretation, surface options rather than guess
    queryable_data_store
    قرار If interpretation is ambiguous, ask the user before running rather than guessing.
  5. 05
    Execute query against the data store with permission constraints applied
    queryable_data_store
  6. 06
    Present the result with the underlying query visible, plus context (what was filtered, what assumptions were made)
    answer_destination
  7. 07
    Log query for audit
    query_audit_log
  8. 08
    Capture feedback for tuning
    answer_feedback_loop
المخرجات · 3

مخرجات منظّمة ينتجها هذا النمط. أنماط ثانية وأنظمة العملاء تقدر تشترك فيها، وهكذا يتركّب الكتالوج مع الوقت.

  • query_pattern_signal

    What people actually ask about, useful for data team prioritization of marts and metrics.

    يُستهلك بواسطة
    • data team roadmap
    • semantic layer maintenance
    • analytics priorities
  • semantic_gap_signal

    Questions the pattern couldn't answer well due to missing definitions or model gaps.

    يُستهلك بواسطة
    • semantic layer authoring
    • data modeling priorities
    • dbt project priorities
  • data_literacy_signal

    Aggregate view of who's asking what across the firm, useful for understanding which teams use data and how.

    يُستهلك بواسطة
    • enablement priorities
    • data team capacity planning
    • data culture metrics