Send to LLM
Send to LLM may be the most frequently used function in NTL. This function sends all previous post-chain content to the LLM for processing.
{{ LLM }}
{{ LLM | prompt: "" }}
{{ LLM | prompt: "" | modelCard: "" | maxTokens: "" | minTokens: "" | temperatureMod: "" | toppMod: "" | freqpenaltyMod: "" }}
Parameters:
- Prompt: An additional prompt to prepend to the previous/existing content in the environment.
- Model Card: (BYOLLM Only) Select a model to use for this call by passing the model's identifier here.
- Max Tokens: Maximum amount of tokens to generate.
- Min Tokens: Minimum amount of tokens to generate.
- Temperature Mod: Controls the randomness of the model's output, with lower values leading to more predictable text and higher values leading to more unpredictable text.
- Top P Mod: Alternative method for controlling randomness in language models that doesn't involve the top-k method as much. Reduces the probability mass from the highest probabilities before drawing samples.
- Frequency Penalty Mod: Controls how much we want to penalize frequency of certain tokens, reducing their probabilities when generating text with these methods for more unique or varied output.
Returns:
- The textual generated output/response of the LLM.
Example:
Write a short poem about NeuralSeek
Here is the definition of NeuralSeek:
{{ web|url:"https://documentation.neuralseek.com/" }}=>{{ summarize|length:200 }}
{{ LLM }}
This will write a short poem about NeuralSeek, based on the content retrieved from our documentation.
In the LLM syntax, you can add additional prompts such as:
Write a short poem about NeuralSeek
Here is the definition of NeuralSeek:
{{ web|url:"https://documentation.neuralseek.com/" }}=>{{ summarize|length:200 }}
{{ LLM|prompt: "write in Spanish" }}
This will prepend "write in Spanish" to the whole prompt given to the LLM, outputting a poem in Spanish.
Table Understanding
This function allows for natural language Q/A against csv/xlsx files.
You start by uploading a spreadsheet, either an Excel or CSV file. Then, you are able to generate insightful responses about the source data by providing queries in natural language.
NeuralSeek undertakes a comprehensive examination of the provided data to output an accurate response. At the bottom of the screen, NeuralSeek provides a confidence percentage, accompanied by a statement of confidence, for example: "Table Understanding reports a confidence level of %". This percentage is based on how much the system trusts the answer it gave you based on what it found in the data.
{{ TableUnderstanding|query:"What year had the highest revenue?" }}
Parameters:
- Query: The natural language query to ask of the given csv/xlsx.
Returns:
- The expected value from the table to answer the Query.
Example:
Mathematical Equation
{{ math|equation:"1 + 1" }}
Performs mathematical equation on input strings.
It allows parsing of complex mathematical expressions, supporting a wide range of mathematical computations, from simple math and operators to trigonometric functions, logarithms, and more. The parser handles nested expressions and variables. Overall, it simplifies mathematical computations with LLMs.
Parameters:
- Equation: The math equation to process. Supports the following (not all inclusively):
- Expression Syntax:
- Operators:
- Arithmetic:
+
,-
,*
,/
,%
,^
- Unary:
+
,-
,!
- Bitwise:
&
,|
,~
,^|
,<<
,>>
,>>>
- Logical:
and
,or
,not
,xor
- Relational:
==
,!=
,<
,>
,<=
,>=
- Assignment:
=
- Conditional:
? :
- Range:
:
- Unit conversion:
to
,in
- Implicit multiplication: e.g.,
2 pi
,(1+2)(3+4)
- Precedence: Grouping with
()
,[]
,{}
- Arithmetic:
- Functions:
- Called with parentheses: e.g.,
sqrt(25)
,log(10000, 10)
- Custom function definition: e.g.,
f(x) = x ^ 2
- Dynamic variables in functions, no closures
- Functions as parameters: e.g.,
twice(func, x) = func(func(x))
- Operator equivalent functions: e.g.,
add(a, b)
fora + b
- Associative functions with multiple arguments: e.g.,
add(a, b, c, ...)
- Called with parentheses: e.g.,
- Constants and Variables:
- Constants:
pi
,e
,i
,Infinity
,NaN
,null
,phi
, ... - Variable naming: Start with alpha, underscore, or dollar sign; may include digits
- Constants:
- Data Types:
- Types: Booleans, numbers, complex numbers, units, strings, matrices, objects
- Booleans: Convertible to numbers and strings
- Numbers: Exponential notation, binary/octal/hex formatting
- BigNumbers: Arbitrary precision
- Complex numbers: Imaginary unit
i
- Units: Arithmetic operations, conversions
- Strings: Enclosed by quotes,
concat
for concatenation - Matrices: Created with
[]
, indexed and ranged - Objects: Key/value pairs in
{}
- Operators:
- Expression Syntax:
Returns:
- The output value of the equation