VSCode Runtime Version: 0.77.0
project files
baml_src
clients.baml
extract.baml
New project
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
›
⌄
⌄
// This is a BAML config file, which extends the Jinja2 templating language to write LLM functions.
class Resume {
name string
education Education[] @description("Extract in the same order listed")
skills string[] @description("Only include programming languages")
}
class Education {
school string
degree string
year int
}
function ExtractResume(resume_text: string) -> Resume {
// see clients.baml
client GPT4o
// The prompt uses Jinja syntax. Change the models or this text and watch the prompt preview change!
prompt #"
Parse the following resume and return a structured representation of the data in the schema below.
Resume:
---
{{ resume_text }}
---
{# special macro to print the output instructions. #}
{{ ctx.output_format }}
JSON:
"#
}
test Test1 {
functions [ExtractResume]
args {
resume_text #"
John Doe
Education
- University of California, Berkeley
- B.S. in Computer Science
- 2020
Skills
- Python
- Java
- C++
"#
}
}
ExtractResume
Test1
system
Parse the following resume and return a structured representation of the data in the schema below. Resume: --- John Doe Education - University of California, Berkeley - B.S. in Computer Science - 2020 Skills - Python - Java - C++ --- Answer in JSON using this schema: { name: string, // Extract in the same order listed education: [ { school: string, degree: string, year: int, } ], // Only include programming languages skills: string[], } JSON:
No tests running