-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/61 질문 재정의 노드 강화 #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/61-\uC9C8\uBB38-\uC7AC\uC815\uC758-\uB178\uB4DC-\uAC15\uD654"
Conversation
* 신규 함수 추가 - 사용자 입력·테이블 목록에 질문 프로파일()을 포함하는 프롬프트 조합 - 구체화 질문 품질 향상 및 LLM 컨텍스트 강화
* Pydantic 모델 `QuestionProfile` 정의 - 시계열·집계·필터·그룹화·랭킹·기간비교 플래그와 `intent_type` 포함 * `profile_prompt` 템플릿 추가 * `create_profile_extraction_chain()` 함수로 LLM 기반 프로파일 추출 지원
질문 재정의시 특징 정보 활용해 재정의하는 노드 utils.py 안 profile_to_text (질문 특징 정보 프롬프트 추가 함수)
…profile_extraction_node 주석 추가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -65,7 +66,10 @@ def execute_query( | |||
# 세션 상태에서 그래프 가져오기 | |||
graph = st.session_state.get("graph") | |||
if graph is None: | |||
graph = builder.compile() | |||
graph_builder = ( | |||
enriched_builder if st.session_state.get("use_enriched") else builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💊 이 부분에 대해서는 @seyoung4503 님이 보여주신 enriched_builder 와 @nonegom 님의 state 분리 등을 잘 고려해서 만들면 더 확장성 있는 형태를 만들 수 있을것 같은데 지금상태로도 너무 좋습니다 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
의견 감사합니다!
제안주신대로 추후에 확장하면 더욱 좋을것 같아요 🤩
#️⃣ Issue Number
📝 요약(Summary)
#61 이슈에서 워크플로우를 살짝 수정했습니다.
기존 흐름:
start
→profile extraction
→query refinement
→context enrichment
→query maker
새로운 흐름:
start
→profile extraction
→테이블 정보를 바탕으로 질문 재정의
→context enrichment
→human feedback
profile extraction
: 자연어 쿼리로부터 질문 유형(Profile)을 추출합니다.context enrichment
:refined_question
,profiles
,related_tables
정보를 이용하여 자연어 질문을 보강합니다.추가 내용:
개선할 점:
현재
human feedback
은 구현되지 않았습니다. 또한,human feedback
노드와 함께, Streamlit에서 질문을 직접 수정하는 기능도 추가로 구현되어야 합니다.💬 To Reviewers (선택)
start
→profile extraction
→테이블 정보를 바탕으로 질문 재정의
→context enrichment
→query maker
새로운 워크플로우에 대한 리뷰를 부탁드립니다. 특히,
query_refiner_prompt.md
를 그대로 사용한 점이 쿼리 결과에 어떤 영향을 미치는지 의견을 부탁드립니다.Lang2SQL/llm_utils/chains.py
Lines 86 to 90 in 1707d46
이 때문에 생성되는 쿼리가 프롬프트의 예시에 영향을 조금 받는 것 같습니다.
새로운 프롬프트를 생성하는 것이 더욱 올바른 접근인지 의견부탁드리겠습니다.!!
human feedback
노드는 아직 구현되지 않았지만, 해당 노드를 추가할 때의 구조나 문제점에 대한 의견을 부탁드립니다.코드와 흐름에 개선할 점이 있으면 알려주세요.
PR Checklist
reference) How to Code Review