Functions

Functions available in the query language.

chevron-rightabshashtag
abs(expr)

Returns the absolute value of the input.

chevron-rightaddhashtag
add(expr1, expr2)

Adds the two inputs.

chevron-rightandhashtag
and(expr1, expr2)

Logical and operation of two boolean columns.

chevron-rightautomated_readability_indexhashtag
automated_readability_index(text)

Returns the ARI (Automated Readability Index) which outputs a number that approximates the grade level needed to comprehend the text. For example if the ARI is 6.5, then the grade level to comprehend the text is 6th to 7th grade.

chevron-rightbleuhashtag
bleu(output, reference)

Computes the BLEU score between two columns.

chevron-rightcharacter_counthashtag
character_count(text)

Returns the number of characters in a text column.

  • Aliases

    • num_chars

chevron-rightcoalescehashtag

Return the first expression that evaluates to a non-null value.

chevron-rightconcathashtag

Concatenates multiple text columns into one.

chevron-rightcontainshashtag

Returns true if the input string contains the substring.

chevron-rightdividehashtag

Divides the two inputs.

chevron-rightembedhashtag

Returns the embedding of a text column. Embedding model: all-mpnet-base-v2.

chevron-rightequal_tohashtag

Computes the element-wise equal to comparison of two columns.

  • Aliases

    • eq

chevron-rightfilterhashtag

Filters a column using another column as a mask.

chevron-rightflesch_kincaid_gradehashtag

Returns the Flesch-Kincaid Grade of the given text. This is a grade formula in that a score of 9.3 means that a ninth grader would be able to read the document.

chevron-rightgreater_thanhashtag

Computes the element-wise greater than comparison of two columns. input1 > input2

  • Aliases

    • gt

chevron-rightgreater_than_or_equal_tohashtag

Computes the element-wise greater than or equal to comparison of two columns. input1 >= input2

  • Aliases

    • gte

chevron-rightis_valid_jsonhashtag

Returns true if the input string is valid json.

chevron-rightless_thanhashtag

Computes the element-wise less than comparison of two columns. input1 < input2

  • Aliases

    • lt

chevron-rightless_than_or_equal_tohashtag

Computes the element-wise less than or equal to comparison of two columns. input1 <= input2

  • Aliases

    • lte

chevron-rightlevenshteinhashtag

Returns Damerau-Levenshtein distance between two strings.

chevron-rightlist_containshashtag

Returns True if the list contains the value.

chevron-rightlist_extracthashtag

Extracts the item at the given index from a list.

chevron-rightlist_has_duplicatehashtag

Returns True if the list has duplicated items.

chevron-rightlist_lengthhashtag

Returns the length of lists in a list column.

chevron-rightlist_most_commonhashtag

Most common item in list.

chevron-rightlist_starts_withhashtag

Returns True if the list starts with the value.

chevron-rightlist_ziphashtag

Zips multiple lists into a list of structs.

chevron-rightllm_answer_groundednesshashtag

Judge if the answer is adhering to the context

chevron-rightllm_answer_refusalhashtag

Judge if the answer is a refusal to answer the question

chevron-rightllm_answer_relevancyhashtag

Judge if the answer is relevant to the question

  • Aliases

    • rag_answer_relevancy

chevron-rightllm_classifyhashtag

Classify text into custom categories using an LLM.

chevron-rightllm_context_relevancyhashtag

LLM as Judge if the contexts are relevant to the question

chevron-rightllm_question_clarityhashtag

Judge if the question is clear

chevron-rightllm_scorehashtag

Score text using an LLM.

chevron-rightllm_summarizationhashtag

Summarize the input and output of a conversational system.

chevron-rightllm_text_frustrationhashtag

Judge the frustration of text (default to input) on a scale of 1 to 5.

chevron-rightllm_text_sentimenthashtag

Judge the sentiment of a text as positive, negative, or neutral.

  • Aliases

    • text_sentiment

chevron-rightllm_text_similarityhashtag

Judge the similarity of an output on a scale of 1 to 5, as compared to a target.

  • Aliases

    • text_similarity

chevron-rightllm_text_toxicityhashtag

Judge the toxicity of a text on a scale of 1 to 5.

chevron-rightmap_extracthashtag

Extracts the value for a given key from a map, returning null if the key is not in the map.

chevron-rightmultiplyhashtag

Multiplies the two inputs.

chevron-rightnegatehashtag

Returns the negation of the input.

chevron-rightnothashtag

Logical not operation of a boolean column.

chevron-rightnot_equal_tohashtag

Computes the element-wise not equal to comparison of two columns.

  • Aliases

    • neq

chevron-rightorhashtag

Logical or operation of two boolean columns.

chevron-rightrouge1hashtag

Returns the rouge1 score between two columns.

chevron-rightrouge2hashtag

Returns the rouge2 score between two columns.

chevron-rightrougeLhashtag

Returns the rougeL score between two columns.

chevron-rightrougeLsumhashtag

Returns the rougeLsum score between two columns.

chevron-rightsentence_counthashtag

Returns the number of sentences in a text column.

  • Aliases

    • num_sentences

chevron-rightstruct_extracthashtag

Extracts a field from a struct expression.

chevron-rightsubtracthashtag

Subtracts the two inputs.

chevron-righttoken_counthashtag

Returns the number of tokens in a text column.

chevron-rightword_counthashtag

Returns the number of words in a text column.

  • Aliases

    • num_words

Was this helpful?