Conversation
* 신규 함수 추가 - 사용자 입력·테이블 목록에 질문 프로파일()을 포함하는 프롬프트 조합 - 구체화 질문 품질 향상 및 LLM 컨텍스트 강화
* Pydantic 모델 `QuestionProfile` 정의 - 시계열·집계·필터·그룹화·랭킹·기간비교 플래그와 `intent_type` 포함 * `profile_prompt` 템플릿 추가 * `create_profile_extraction_chain()` 함수로 LLM 기반 프로파일 추출 지원
질문 재정의시 특징 정보 활용해 재정의하는 노드 utils.py 안 profile_to_text (질문 특징 정보 프롬프트 추가 함수)
…profile_extraction_node 주석 추가
ehddnr301
approved these changes
May 14, 2025
| if graph is None: | ||
| graph = builder.compile() | ||
| graph_builder = ( | ||
| enriched_builder if st.session_state.get("use_enriched") else builder |
Collaborator
There was a problem hiding this comment.
💊 이 부분에 대해서는 @seyoung4503 님이 보여주신 enriched_builder 와 @nonegom 님의 state 분리 등을 잘 고려해서 만들면 더 확장성 있는 형태를 만들 수 있을것 같은데 지금상태로도 너무 좋습니다 :)
Contributor
Author
There was a problem hiding this comment.
의견 감사합니다!
제안주신대로 추후에 확장하면 더욱 좋을것 같아요 🤩
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#️⃣ Issue Number
📝 요약(Summary)
#61 이슈에서 워크플로우를 살짝 수정했습니다.
기존 흐름:
start→profile extraction→query refinement→context enrichment→query maker새로운 흐름:
start→profile extraction→테이블 정보를 바탕으로 질문 재정의→context enrichment→human feedbackprofile 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