LogoLogo
Book a DemoWebsite
  • Overview
  • Basics
    • Design Your Data
    • Templates
    • Fields
    • Research Questions
    • Profiles
  • Client
    • Templates
    • Fields
    • Research Questions
    • Profiles
  • API Reference
    • Templates
    • Fields
    • Research Questions
    • Profiles
  • Quick Starts
    • Company
Powered by GitBook
On this page
  • Overview
  • String: str
  • Boolean: bln
  • Integer: int
  • Float: flt
  • Relationship: rel
  • Preset Values: enm
  1. Client

Fields

Fields are one of the most basic building blocks in Evrim. Fields give users granular control over what data should look like inside of a Template.

PreviousTemplatesNextResearch Questions

Last updated 3 months ago


Overview

Let's continue to build out our Company Template example and show a few different Field types.

Fields have three required parameters:

  • name: name of field being created

  • description: more detail about what the field should contain

  • type: data type of final value

Fields can also be six different types:

  • : text field

  • : true/false field

  • : fixed numerical field

  • : Floating point numerical field

  • : One to many relational field

  • : User defined string values

Check out the full to see all available parameters for Fields.

String: str

A text field can be used to extract, summarize, or create information based on collected information.

ceo = Field(
    name="ceo",
    description="CEO as of 2024"
    type="str"
)
template.fields.append(ceo)

Boolean: bln

Make a True/False determination based on collected information.

legal_problems = Field(
    name="has_legal_problems",
    description="Does the company have on going legal problems in the last 5 years",
    type="bln"
)
template.fields.append(legal_problems)

Integer: int

Fixed numerical value based on collected information.

revenue_2024 = Field(
    name="revenue_2024",
    description="Company revenue in 2024 (in millions)",
    type="int"
)
template.fields.append(revenue_2024)

Float: flt

Floating point numerical value based on collected information.

stock_price = Field(
    name="stock_price",
    description="Current company stock price",
    type="flt"
)
template.fields.append(stock_price)

Relationship: rel

One to many relationships extracted from collected information.

employees = Field(
    name="employees",
    description="Employees of the company",
    type="rel"
    sources=["linkedin.com"]
)
template.fields.append(employees)

Interestingly, Fields can also take in an optional sources parameter to control where information is extracted from. In this case, we will look at linkedin.com for employee information.

Preset Values: enm

company_type = Field(
    name="type",
    description="type of company",
    type="enm",
    enum_values=["PUBLIC", "PRIVATE"],
    enum_many=False
)
template.fields.append(company_type)

Behind the scenes, we do our best to generate only a PUBLIC or PRIVATE determination after collection is done. A few things to note:

  • enum_many: This boolean flag control multiple or a single preset value being returned

    • In this case, since we are making a determination about the companies private or public status, we set this to False. But if we were defining a business verticals preset values field, we probably would want this as true to get all available best values based on collected information.

Before we start using our Template, let's revisit Research Questions briefly to enrich our data collection process even further.

Preset values, or , allows users to constrain the generation space of the large language model to only a few or many specified options based on collected information.

String
Boolean
Integer
Float
Relationship
Preset Value
Client Docs
enums