LLM 출력에서 자주 보이는 <think> 태그
·
LLM AI Agent
LLM을 직접 다루다 보면 종종 이런 형태의 출력을 보게 된다.문제를 단계별로 분석해보면...먼저 사용자의 의도를 파악하고...그다음 답변 구조를 정하면...최종 답변은 다음과 같습니다. 처음 보면 가 뭔가 특별한 시스템 명령어처럼 보인다.하지만 실제로는 공식 표준 태그라기보다는, 모델의 추론 과정을 구분하기 위해 쓰는 관습적인 마커에 가깝다. ex) Qwen3 계열은 크게 Thinking mode와 Non-thinking mode를 지원한다. Thinking mode에서는 모델이 답변 전에 추론을 수행하고, 일부 모델·설정에서는 그 추론 내용이 ... 블록으로 출력됨. Non-thinking mode에서는 보통 바로 답만 내며 블록을 만들지 않는다.1. 태그?는 보통 LLM의 추론 과정, 즉 r..
LLM AI Agent toy project - #2 Tool call
·
LLM AI Agent
목표LLM이 필요한 도구를 직접 골라 실행할 수 있게끔 Agent 설계 코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject/blob/main/test_toolcall.py 1) test_toolcall.py - get_today_schedule() Tool call 정의 from langchain_core.tools import tool@tooldef get_today_schedule() -> dict: """Retrieve today's calendar schedule.""" today = TODAY # str(date.today()) events = FAKE_CALENDAR.get(today, []) return { "d..
LLM AI Agent toy project - #1 기본 LLM 테스트
·
LLM AI Agent
목표Single-turn 테스트Multi-turn 테스트Embedding vector 테스트코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject/blob/main/test_llm.py$ python test_llm.py결과Single-turn 테스트=== Single Turn Test ===>>>>>>> User: Hello! Introduce yourself briefly.Assistant: Hello there! I am a large language model trained by Mistral AI, designed to assist with a wide range of tasks and provide engaging conversation. I don..
LLM AI Agent toy project - #3 MCP Server 예제 (python FastMCP)
·
LLM AI Agent
목표FastMCP를 이용해서 LLM에 MCP server 연결해보기코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject$ python mcp_server.py - MCP 서버 실행$ python test_mcp.py- MCP 클라 실행 mcp_server.pyfrom mcp.server.fastmcp import FastMCPmcp = FastMCP("example-server")@mcp.tool()def add(a: int, b: int) -> int: """ Add two numbers. Args: a: first number b: second number """ return a + bmcp server에..