File size: 647 Bytes
06696b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from generator.prompt_builder_all import build_prompt as build_prompt_all

def build_prompt_all(query, law_docs, exam_docs):
    # law_docs / exam_docs: list of reranked document strings
    law_str = "\n\n".join(law_docs)
    exam_str = "\n\n".join(exam_docs)

    system_msg = "당신은 κ³΅μΈμ€‘κ°œμ‚¬ μ‹œν—˜ 문제 좜제 μ „λ¬Έκ°€μž…λ‹ˆλ‹€."
    guidance = "μ•„λž˜λŠ” κ΄€λ ¨ 법령과 κΈ°μΆœλ¬Έμ œμž…λ‹ˆλ‹€:\n"

    prompt = f"""{system_msg}\n\n{guidance}

[법령 정보]

{law_str}



[기좜문제 정보]

{exam_str}



[질문]

{query}



[μ§€μ‹œμ‚¬ν•­]

- μ •ν™•ν•˜κ³  λͺ…ν™•ν•˜κ²Œ λ‹΅λ³€ν•˜μ„Έμš”."""

    return prompt