Examples

Read a CV into typed records

Open in playground →
  • Image input
  • object
  • array

Task

Turn an image of a CV into a candidate record, one entry for each job, and every skill it lists.

Challenges

  • The CV is a PDF page sent as an image: the model reads the layout, not text you extracted first.
  • The current job has no end year, so end_year is null; every other year is an integer, not a string.
  • Seven jobs and sixteen skills: each array ends when no more items belong in it. The degrees and languages are not jobs or skills, so they are not in the arrays.
The image sent with this call

Laying out…

Time 6.44 s · Cost $0.00011

Generation(
    result={
        'candidate': {
            'name': 'ELENA MARCHETTI',
            'email': 'elena.marchetti@example.com',
            'city': 'Milan',
        },
        'work_experience': [
            {
                'company': 'Lumina Health',
                'title': 'Staff Data Engineer',
                'start_year': 2023,
                'end_year': None,
            },
            {
                'company': 'Corvo Logistics',
                'title': 'Senior Data Engineer',
                'start_year': 2020,
                'end_year': 2023,
            },
            {
                'company': 'Pallino Bank',
                'title': 'Data Engineer',
                'start_year': 2018,
                'end_year': 2020,
            },
            {
                'company': 'Ventura Travel',
                'title': 'Software Engineer',
                'start_year': 2016,
                'end_year': 2018,
            },
            {
                'company': 'Ortica Studio',
                'title': 'Backend Developer',
                'start_year': 2014,
                'end_year': 2016,
            },
            {
                'company': 'Nebbia Software',
                'title': 'Junior Developer',
                'start_year': 2012,
                'end_year': 2014,
            },
            {
                'company': 'Politecnico di Milano',
                'title': 'Teaching Assistant',
                'start_year': 2011,
                'end_year': 2012,
            },
        ],
        'skills': [
            'Python',
            'SQL',
            'Scala',
            'Java',
            'Go',
            'Apache Spark',
            'Apache Kafka',
            'Apache Flink',
            'Airflow',
            'dbt',
            'PostgreSQL',
            'Snowflake',
            'BigQuery',
            'Kubernetes',
            'Terraform',
            'AWS',
        ],
    },
    thinking={},
    usage=Usage(input_tokens=2232, thinking_tokens=0),
)