Spaces:
Runtime error
Runtime error
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
|