├── README.md ├── backend ├── entrypoint.sh ├── requirements.txt └── src │ ├── __pycache__ │ ├── agent.cpython-310.pyc │ ├── app.cpython-310.pyc │ ├── brain.cpython-310.pyc │ ├── cache.cpython-310.pyc │ ├── database.cpython-310.pyc │ ├── functions.cpython-310.pyc │ ├── models.cpython-310.pyc │ ├── tasks.cpython-310.pyc │ ├── tavily_search.cpython-310.pyc │ └── utils.cpython-310.pyc │ ├── agent.py │ ├── app.py │ ├── brain.py │ ├── cache.py │ ├── database.py │ ├── models.py │ ├── schemas.py │ ├── search_document │ ├── __pycache__ │ │ ├── combine_search.cpython-310.pyc │ │ ├── rerank.cpython-310.pyc │ │ ├── search_elastic.cpython-310.pyc │ │ ├── search_with_bge.cpython-310.pyc │ │ └── search_with_e5.cpython-310.pyc │ ├── combine_search.py │ ├── rerank.py │ ├── search_elastic.py │ ├── search_with_bge.py │ └── search_with_e5.py │ ├── tasks.py │ ├── tavily_search.py │ └── utils.py ├── chatbot-ui ├── chat_interface.py ├── config.toml ├── entrypoint.sh └── requirements.txt ├── finetune_llm ├── download_model.py ├── evaluate_finetuned_model.py ├── finetune.py ├── gen_data.py ├── merge_with_base.py ├── requirements.txt ├── run_infer_tgi.sh └── test_model.py ├── images ├── demo.png ├── rag_flow.jpg └── tracking_finetune_llm.png └── retrieval ├── create_data_rerank.py ├── finetune.sh ├── hard_negative_bge_round1.py ├── hard_negative_e5.py └── setup_env.sh /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/README.md -------------------------------------------------------------------------------- /backend/entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/entrypoint.sh -------------------------------------------------------------------------------- /backend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/requirements.txt -------------------------------------------------------------------------------- /backend/src/__pycache__/agent.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/agent.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/app.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/app.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/brain.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/brain.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/cache.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/cache.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/database.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/database.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/functions.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/functions.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/tasks.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/tasks.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/tavily_search.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/tavily_search.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/__pycache__/utils.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/__pycache__/utils.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/agent.py -------------------------------------------------------------------------------- /backend/src/app.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/app.py -------------------------------------------------------------------------------- /backend/src/brain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/brain.py -------------------------------------------------------------------------------- /backend/src/cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/cache.py -------------------------------------------------------------------------------- /backend/src/database.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/database.py -------------------------------------------------------------------------------- /backend/src/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/models.py -------------------------------------------------------------------------------- /backend/src/schemas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/schemas.py -------------------------------------------------------------------------------- /backend/src/search_document/__pycache__/combine_search.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/__pycache__/combine_search.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/search_document/__pycache__/rerank.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/__pycache__/rerank.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/search_document/__pycache__/search_elastic.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/__pycache__/search_elastic.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/search_document/__pycache__/search_with_bge.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/__pycache__/search_with_bge.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/search_document/__pycache__/search_with_e5.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/__pycache__/search_with_e5.cpython-310.pyc -------------------------------------------------------------------------------- /backend/src/search_document/combine_search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/combine_search.py -------------------------------------------------------------------------------- /backend/src/search_document/rerank.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/rerank.py -------------------------------------------------------------------------------- /backend/src/search_document/search_elastic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/search_elastic.py -------------------------------------------------------------------------------- /backend/src/search_document/search_with_bge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/search_with_bge.py -------------------------------------------------------------------------------- /backend/src/search_document/search_with_e5.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/search_document/search_with_e5.py -------------------------------------------------------------------------------- /backend/src/tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/tasks.py -------------------------------------------------------------------------------- /backend/src/tavily_search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/tavily_search.py -------------------------------------------------------------------------------- /backend/src/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/backend/src/utils.py -------------------------------------------------------------------------------- /chatbot-ui/chat_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/chatbot-ui/chat_interface.py -------------------------------------------------------------------------------- /chatbot-ui/config.toml: -------------------------------------------------------------------------------- 1 | [browser] 2 | gatherUsageStats = false 3 | -------------------------------------------------------------------------------- /chatbot-ui/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | streamlit run chat_interface.py --server.port 8051 3 | -------------------------------------------------------------------------------- /chatbot-ui/requirements.txt: -------------------------------------------------------------------------------- 1 | tenacity 2 | streamlit==1.36.0 3 | requests==2.32.3 4 | 5 | -------------------------------------------------------------------------------- /finetune_llm/download_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/download_model.py -------------------------------------------------------------------------------- /finetune_llm/evaluate_finetuned_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/evaluate_finetuned_model.py -------------------------------------------------------------------------------- /finetune_llm/finetune.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/finetune.py -------------------------------------------------------------------------------- /finetune_llm/gen_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/gen_data.py -------------------------------------------------------------------------------- /finetune_llm/merge_with_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/merge_with_base.py -------------------------------------------------------------------------------- /finetune_llm/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/requirements.txt -------------------------------------------------------------------------------- /finetune_llm/run_infer_tgi.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/run_infer_tgi.sh -------------------------------------------------------------------------------- /finetune_llm/test_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/finetune_llm/test_model.py -------------------------------------------------------------------------------- /images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/images/demo.png -------------------------------------------------------------------------------- /images/rag_flow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/images/rag_flow.jpg -------------------------------------------------------------------------------- /images/tracking_finetune_llm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/images/tracking_finetune_llm.png -------------------------------------------------------------------------------- /retrieval/create_data_rerank.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/retrieval/create_data_rerank.py -------------------------------------------------------------------------------- /retrieval/finetune.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/retrieval/finetune.sh -------------------------------------------------------------------------------- /retrieval/hard_negative_bge_round1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/retrieval/hard_negative_bge_round1.py -------------------------------------------------------------------------------- /retrieval/hard_negative_e5.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/retrieval/hard_negative_e5.py -------------------------------------------------------------------------------- /retrieval/setup_env.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngothanhnam0910/Vietnamese-Law-Question-Answering-system/HEAD/retrieval/setup_env.sh --------------------------------------------------------------------------------