Skip to content
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

feat(ChatKnowledge): ChatKnowledge Support Keyword Retrieve #1624

Merged
merged 9 commits into from
Jun 13, 2024

Conversation

Aries-ckt
Copy link
Collaborator

@Aries-ckt Aries-ckt commented Jun 11, 2024

Close #1623

Description

  • ChatKnowledge Support Keyword Retrieve
    create_keyword_rag
  • Add IndexStoreBase in RAG module
  • Refactor connector module

When to Use Keyword Retrieve:

Looking for something ultra-specific and already understand the topic
Research is narrowly focused with clear objectives
Queries contain unique proper nouns like brand names
Needs require fast results more than exhaustive relevancy For precise or time-sensitive queries, keyword search will target the exact terms efficiently. Vector search may meander with unnecessary semantic expansion.

How Has This Been Tested?

ChatKnowledge App

  1. install Elasticsearch, refer https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
  2. set Elasticsearch envrionment in .env
ELASTICSEARCH_URL=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=dbgpt
  1. create knowledge space via Full Text
  2. Knowledge Chat via Keyword Search
    keyword_search_chat

Test IndexStore in examples

# test keyword rag
python examples/rag/keyword_rag_example.py
# test embedding rag
python examples/rag/embedding_rag_example.py
# test graph rag
python examples/rag/graph_rag_example.py

Snapshots:

Include snapshots for easier review.

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added the enhancement New feature or request label Jun 11, 2024
@Aries-ckt Aries-ckt changed the title feat: ChatKnowledge Support Keyword Retrieve feat[ChatKnowledge]: ChatKnowledge Support Keyword Retrieve Jun 11, 2024
@Aries-ckt Aries-ckt changed the title feat[ChatKnowledge]: ChatKnowledge Support Keyword Retrieve feat(ChatKnowledge): ChatKnowledge Support Keyword Retrieve Jun 11, 2024
@github-actions github-actions bot added the ChatKnowledge Module: ChatKnowledge label Jun 11, 2024
Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Copy link
Collaborator

@fangyinc fangyinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fangyinc fangyinc merged commit 58d0878 into eosphoros-ai:main Jun 13, 2024
4 checks passed
Hopshine pushed a commit to Hopshine/DB-GPT that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChatKnowledge Module: ChatKnowledge enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][ChatKnowledge] Support Keyword Retrieve
3 participants