Spaces:
Runtime error
Runtime error
| def build_prompt(query: str, context_docs: list) -> str: | |
| """ | |
| ์ฌ์ฉ์ ์ง๋ฌธ๊ณผ ๊ฒ์๋ ๋ฌธ์๋ค์ ์กฐํฉํด LLM ์ ๋ ฅ์ฉ ํ๋กฌํํธ๋ฅผ ๋ง๋ ๋ค. | |
| """ | |
| context_text = "\n".join([f"- {doc}" for doc in context_docs]) | |
| prompt = f"""๋น์ ์ ๊ณต์ธ์ค๊ฐ์ฌ ์ํ ๋ฌธ์ ์ถ์ ์ ๋ฌธ๊ฐ์ ๋๋ค. | |
| ๋ค์์ ๊ธฐ์ถ ๋ฌธ์ ๋ฐ ๊ด๋ จ ๋ฒ๋ น ์ ๋ณด์ ๋๋ค: | |
| {context_text} | |
| ์ด ์ ๋ณด๋ฅผ ์ฐธ๊ณ ํ์ฌ ์ฌ์ฉ์์ ์์ฒญ์ ๋ต๋ณํด ์ฃผ์ธ์. | |
| [์ง๋ฌธ] | |
| {query} | |
| [๋ต๋ณ] | |
| """ | |
| return prompt | |