πŸ‘ Assessment & Evaluation Results Log schema

Preview

This feature is in Private Preview. To try it, reach out to your Databricks contact.

Looking for a different RAG Studio doc? Go to the RAG documentation index

df.printSchema()

root
 |-- request_id: string (nullable = true)
 |-- step_id: string (nullable = true)
 |-- source: struct (nullable = true)
 |    |-- type: string (nullable = true)
 |    |-- id: string (nullable = true)
 |    |-- tags: map (nullable = true)
 |    |    |-- key: string
 |    |    |-- value: string (valueContainsNull = true)
 |-- timestamp: timestamp (nullable = true)
 |-- text_assessment: struct (nullable = true)
 |    |-- step_id: string (nullable = true)
 |    |-- ratings: map (nullable = true)
 |    |    |-- key: string
 |    |    |-- value: struct (valueContainsNull = true)
 |    |    |    |-- bool_value: boolean (nullable = true)
 |    |    |    |-- double_value: double (nullable = true)
 |    |    |    |-- rationale: string (nullable = true)
 |    |-- free_text_comment: string (nullable = true)
 |    |-- suggested_output: string (nullable = true)
 |-- retrieval_assessment: struct (nullable = true)
 |    |-- position: integer (nullable = true)
 |    |-- step_id: string (nullable = true)
 |    |-- ratings: map (nullable = true)
 |    |    |-- key: string
 |    |    |-- value: struct (valueContainsNull = true)
 |    |    |    |-- bool_value: boolean (nullable = true)
 |    |    |    |-- double_value: double (nullable = true)
 |    |    |    |-- rationale: string (nullable = true)
 |    |-- free_text_comment: string (nullable = true)

df.schema

from pyspark.sql.types import *
schema = StructType(
    [
        StructField("request_id", StringType(), True),
        StructField("step_id", StringType(), True),
        StructField(
            "source",
            StructType(
                [
                    StructField("type", StringType(), True),
                    StructField("id", StringType(), True),
                    StructField(
                        "tags", MapType(StringType(), StringType(), True), True
                    ),
                ]
            ),
            True,
        ),
        StructField("timestamp", TimestampType(), True),
        StructField(
            "text_assessment",
            StructType(
                [
                    StructField("step_id", StringType(), True),
                    StructField(
                        "ratings",
                        MapType(
                            StringType(),
                            StructType(
                                [
                                    StructField("bool_value", BooleanType(), True),
                                    StructField("double_value", DoubleType(), True),
                                    StructField("rationale", StringType(), True),
                                ]
                            ),
                            True,
                        ),
                        True,
                    ),
                    StructField("free_text_comment", StringType(), True),
                    StructField("suggested_output", StringType(), True),
                ]
            ),
            True,
        ),
        StructField(
            "retrieval_assessment",
            StructType(
                [
                    StructField("position", IntegerType(), True),
                    StructField("step_id", StringType(), True),
                    StructField(
                        "ratings",
                        MapType(
                            StringType(),
                            StructType(
                                [
                                    StructField("bool_value", BooleanType(), True),
                                    StructField("double_value", DoubleType(), True),
                                    StructField("rationale", StringType(), True),
                                ]
                            ),
                            True,
                        ),
                        True,
                    ),
                    StructField("free_text_comment", StringType(), True),
                ]
            ),
            True,
        ),
    ]
)