HCX-007을 Langchain을 통해 사용하고 있습니다.
프롬프트 가이드를 작성하고 기존의 HCX-005, HCX-003 과 비교 해봤을때 추론모델은 비교적 프롬프트 주입을 좀 무시하는 경향이 있는것 같습니다.
(동일한 프롬프트 기반으로 작성 테스트 기준)
추론 on/off 에 따른 프롬프트 내용의 반응성 특별히 주의해야할 사항이 있는지 궁금해서 문의드립니다.
모델 파라메터값은 아래와 같이 사용하고 있습니다.
temperature=0.2,
max_completion_tokens=10240,
top_p=0.85,
repetition_penalty=1.1,
일부 소스:
prompt_template = ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate.from_template(system_message_01_combined),
MessagesPlaceholder(variable_name="history"),
HumanMessagePromptTemplate.from_template(human_template_01_combined)
])
_llm = llm if request.think_mode else nothink_llm
chain = prompt_template | _llm
# LCEL Chain
async for chunk in chain.astream({
"input": request.query,
"context": docs_content,
"history": messages
}, config=RunnableConfig(tags=["final_response_generation"], timeout=120)):
#print(f"Chunk data : {chunk}")