Skip to content

36 언어 감지 노드 추가 #37

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

Closed
wants to merge 3 commits into from

Conversation

DShomin
Copy link
Contributor

@DShomin DShomin commented Mar 27, 2025

#️⃣ Issue Number

📝 요약(Summary)

  • 사용자의 질문을 정규표현식을 이용하여 언어 감지를 하는 기능을 추가하였습니다.

💬 To Reviewers (선택)

  • state에 language, confidence, method 로 정의하였지만 적절하지 않거나 별도의 객체가 필요할 수 있을 것 같습니다.

PR Checklist

Test 수행 결과
Test Name Input Text Expected Language Detected Language Confidence Method
mixed_language_text Hello 안녕하세요 안녕하세요 ko ko 0.5882 regex
mixed_language_text 안녕 Hello hello hello en en 0.6 regex
mixed_language_text Hello 世界世界世界 zh zh 0.5 regex
text2sql_complex_queries 직원 테이블에서 부서가 'IT'이고 급여가 5000 이상인 직원들의 이름, 부서, 급여를 조회해주세요 ko ko 0.5 regex
text2sql_complex_queries Show me the name, department and salary of employees in IT department with salary greater than 5000 en en 0.95 regex
text2sql_complex_queries SELECT, WHERE, GROUP BY, HAVING을 사용해서 부서별 평균 급여가 5000 이상인 부서의 정보를 보여주세요 ko ko 0.3214 regex
text2sql_complex_queries Use SELECT with WHERE and GROUP BY to show departments with average salary above 5000 en en 0.95 regex
text2sql_queries 직원 테이블에서 이름과 급여를 조회해줘 ko ko 0.8095 regex
text2sql_queries 매출이 1000000 이상인 거래내역을 보여줘 ko ko 0.56 regex
text2sql_queries 부서별 평균 급여를 계산해서 보여주세요 ko ko 0.8095 regex
text2sql_queries Show me the sales records from the transactions table en en 0.95 regex
text2sql_queries Calculate average salary by department en en 0.95 regex
text2sql_queries List all employees with salary greater than 5000 en en 0.95 regex
text2sql_queries SELECT와 WHERE을 사용해서 직원 정보를 조회해줘 ko ko 0.4839 regex
text2sql_queries GROUP BY로 부서별 통계를 내줘 ko ko 0.45 regex
text2sql_queries INNER JOIN으로 두 테이블을 연결해서 보여줘 ko ko 0.5 regex
text2sql_queries Use SELECT and WHERE to show employee info en en 0.95 regex
text2sql_queries Group the results by department using GROUP BY en en 0.95 regex
text2sql_queries Join these tables with INNER JOIN en en 0.95 regex
basic_language_detection Hello world en en 0.95 regex
basic_language_detection 안녕하세요 ko ko 1 regex
basic_language_detection Bonjour, j'ai été là fr fr 0.95 regex
basic_language_detection ¿Cómo estás hoy? es es 0.95 regex
basic_language_detection こんにちは ja ja 1 regex
basic_language_detection 你好世界 zh zh 1 regex
basic_language_detection Привет мир ru ru 0.9 regex

reference) How to Code Review

  • 따봉(👍): 리뷰어가 리뷰이의 코드에서 칭찬의 의견을 남기고 싶을 때 사용합니다.
  • 느낌표(❗): 리뷰어가 리뷰이에게 필수적으로 코드 수정을 요청할 때 사용합니다.
  • 물음표 (❓): 리뷰어가 리뷰이에게 의견을 물어보고 싶을 때 사용합니다.
  • 알약 (💊): 리뷰어가 리뷰이의 코드에서 개선된 방법을 제안하지만 그것의 반영이 필수까지는 아닐 때 사용합니다.

@DShomin DShomin linked an issue Mar 27, 2025 that may be closed by this pull request
2 tasks
@ehddnr301
Copy link
Collaborator

ehddnr301 commented Mar 27, 2025

❓한글 사용자가 영어단어를 섞어서 질문하는것에대해 가중치를 두어 처리하는것은 이해하였습니다. 그럼 영어사용자가 한글단어를 섞어 질문하는것은 잘못 판단하게 될것같은데 제가 이해한바가 맞을까요?
ex

Show me the '이름', '부서' and '급여' of employees in 'IT부서' with '급여' greater than 5000 

💊 단순히 출력 언어를 선택하게 하는 방식은 어떨까요?
ChatGPT와 같은 자연스러운 대화 경험보다는, 저희가 풀고싶은 문제인 Query Generation에 초점을 맞추었으면 합니다.

💬 제가 PR리뷰시 전달과 목표설정을 명확하게 하지 못하여 작업방향에 혼선을 드린것 같기도 합니다 ㅜㅜ! 더 노력해보겠습니다.

@DShomin
Copy link
Contributor Author

DShomin commented Mar 27, 2025

❓한글 사용자가 영어단어를 섞어서 질문하는것에대해 가중치를 두어 처리하는것은 이해하였습니다. 그럼 영어사용자가 한글단어를 섞어 질문하는것은 잘못 판단하게 될것같은데 제가 이해한바가 맞을까요?

ex


Show me the '이름', '부서' and '급여' of employees in 'IT부서' with '급여' greater than 5000 

💊 단순히 출력 언어를 선택하게 하는 방식은 어떨까요?

ChatGPT와 같은 자연스러운 대화 경험보다는, 저희가 풀고싶은 문제인 Query Generation에 초점을 맞추었으면 합니다.

💬 제가 PR리뷰시 전달과 목표설정을 명확하게 하지 못하여 작업방향에 혼선을 드린것 같기도 합니다 ㅜㅜ! 더 노력해보겠습니다.

단순히 sql explain 생성이 영어로 나오는 것을 질문자가 사용한 언어를 감지하고 그에 맞게 설명을 할 수 있는 것이라면 더 좋을 것 같아 작업을 진행했습니다 말씀하신 것 처럼 사용자 언어를 받는게 가장 확실한 방법인 것 같아 토큰 사용이 없고 가볍게 사용하기 위해 정규 표현식으로 작업했습니다. 해당 PR이 적절하지 않다면 말씀하신 방법으로 해결하는 것도 좋은 방법인 것 같습니다

@ParkGyeongTae
Copy link
Contributor

💊오.. 이런식으로 접근할수도 있겠네요... 확실히 두 언어가 섞인 경우가 애매할 것 같긴 합니다 ㅠㅠ..! 추후에 이런 부분들을 옵션으로 제공하면 좋을 것 같아요!

@ehddnr301
Copy link
Collaborator

@YuujinHwang 님 의견을 반영해서
description 언어와 질의 언어를 맞추는게 중요할듯
한번은 원래언어 / 한번은 번역언어로 시도하기
요런 부분으로 디벨롭해보면 좋을것같습니다.

@ehddnr301 ehddnr301 closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

언어 감지 노드 추가
3 participants