Skip to content

Added meilisearch retriever component #2824

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

Merged
merged 15 commits into from
Aug 18, 2024
Merged

Conversation

MohamedYasserOaf
Copy link
Contributor

for the past 2 weeks , we needed to implement a retriever that utilized meilisearch for hybrid search powered retrieval , the component was created as a custom retriever, you either search an existing index using meilisearch and retrieve context for your LLM or you can upsert an existing or a new index to include new files that can be read using any flowise powered document store or document reading function, then you can retrieve context from this new index, more modifications and improvements may be introduced in future PRs, some commits are related to our personal CI/CD pipeline which can be ignored or re-modified after merge, kindly have a look and address any issues in the comments

…lity (FlowiseAI#3)

meilisearch retriever component created , searching for an existing index and upserting a new or existing index has been implemented , component utilizes langchain and meilisearch vector search

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/3
Reviewed-by: mohamed1999akram <[email protected]>
… actions (FlowiseAI#5)

added --no-lock-file flag to pass CICD , made the runner run on debian and not ubuntu , removed code that caused warnings to pass linting

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/5
Reviewed-by: omaryassery <[email protected]>
dockerfile-ntg modified to copy all working directory before calling pnpm install
Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/9
Reviewed-by: isameh <[email protected]>
@HenryHengZJ
Copy link
Contributor

@MohamedYasserOaf I've updated the code, and moved it into Vector Store folder, can you give this a test?

@MohamedYasserOaf
Copy link
Contributor Author

I pulled the branch and applied pnpm install , the code fails on the build process , can't exactly point out the issue , i can send you the logs
@HenryHengZJ

@HenryHengZJ
Copy link
Contributor

I pulled the branch and applied pnpm install , the code fails on the build process , can't exactly point out the issue , i can send you the logs @HenryHengZJ

because this pulls in the main branch with 2.0 changes, you need to
1.) remove all the node_modules
2.) pnpm i
3.) pnpm clean
4.) pnpm build-force

@MohamedYasserOaf
Copy link
Contributor Author

@HenryHengZJ I removed all the node_modules and followed your instructions , the issue still persist , maybe because my main is not up to date ?

@HenryHengZJ
Copy link
Contributor

I was able to run it:
image

but there is no documents upserted:
image

@MohamedYasserOaf
Copy link
Contributor Author

@HenryHengZJ my friend was able to run it too, I will check the dependencies from my side, you will find the documents upserted on your index but you will not get notified, this is a functionality i need to implement, maybe i can add it to this PR, you can try to chat with the flow to test in the meantime

@HenryHengZJ
Copy link
Contributor

no I dont see anything upserted on Meilisearch, and chatting with it always return nothing

@MohamedYasserOaf
Copy link
Contributor Author

I will lookup the issue after solving my build issue, we are already using our custom flowise image with meilisearch retriever in our production environment, providing great results, will check and come back to you

@MohamedYasserOaf
Copy link
Contributor Author

MohamedYasserOaf commented Aug 5, 2024

@HenryHengZJ Hello Henry, I resolved my dependency problems and re-installed everything, I rebased with the latest commits from the main repository, now the build step fails because of a component called Melvis, the same happens with my friend

params: vectorStore.indexSearchParams

the above line causes the problem
image
The code build when I apply @ts-ignore on this line
image

image
regardless of the poor answer and documents used (I run locally with no gpu and old processor), the component is up and running , and i also synced my forked and updated my branch

@HenryHengZJ
Copy link
Contributor

yeah I realized thhat as well and solved this in this PR

did you upsert the data on Flowise? or you are just using for retrieval?

@MohamedYasserOaf
Copy link
Contributor Author

yes I upserted using the flow, you tried doing so ? we use a UI to visualize our indexes، I can shoot you a small video or a series of screenshots of the process, we also added features like an option to delete an index, we added metadata as searchable attributes for appling various filters when retrieving.

@HenryHengZJ
Copy link
Contributor

ah okay because I was not able to do so when I try upserting, so I wonder did that work for you.

feel free to send me the screenshot/videos!

@MohamedYasserOaf
Copy link
Contributor Author

MohamedYasserOaf commented Aug 10, 2024

@HenryHengZJ Hello henry, the following screenshot shows the whole process,

This is a screenshot of our flow, the index used is "my-index-1" , test bool document store contains around 7 pdfs chunked using unstructured.io
Screenshot from 2024-08-10 19-38-27

image

These screenshots shows "my-index-1" having 0 documents
Screenshot from 2024-08-10 19-19-10
Screenshot from 2024-08-10 19-19-28

The following screenshot shows my flowise upsert window
image

this is my index after upserting
Screenshot from 2024-08-10 19-42-19
image

This is a screenshot of my chat window using my flow, you can see it has retrieved context from my upserted index
image
Screenshot from 2024-08-10 20-13-39

  • You can try to visualize your index in a 3rd party tool or via API calls to ensure your index is properly upserted
  • You want to make sure that you entered your admin api key, I encountered this at the beginning I was using only the search API key
  • Try to watch the terminal for any errors occured during upsert process

@HenryHengZJ
Copy link
Contributor

Thanks for the screenshot!

@HenryHengZJ HenryHengZJ merged commit d5153c3 into FlowiseAI:main Aug 18, 2024
2 checks passed
patrickreinan pushed a commit to patrickreinan/Flowise that referenced this pull request Sep 3, 2024
* added meilisearch retriever and credentials.ts

* added semantic ratio

* removed a TODO implementatio

* meilisearch component implemented with searching and upsert functionality (FlowiseAI#3)

meilisearch retriever component created , searching for an existing index and upserting a new or existing index has been implemented , component utilizes langchain and meilisearch vector search

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/3
Reviewed-by: mohamed1999akram <[email protected]>

* added CI/CD for ntg branch, added proper dockerfile for flowise-ntg (FlowiseAI#4)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/4
Reviewed-by: mohammad <[email protected]>

* modified os version , removed linting errors , removed cypress github actions (FlowiseAI#5)

added --no-lock-file flag to pass CICD , made the runner run on debian and not ubuntu , removed code that caused warnings to pass linting

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/5
Reviewed-by: omaryassery <[email protected]>

* removed unnecessary QEMU install action (FlowiseAI#6)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/6
Reviewed-by: omaryassery <[email protected]>

* removed cypress installation and linting from dockerfile (FlowiseAI#7)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/7
Reviewed-by: isameh <[email protected]>

* dockerfile-ntg-modification (FlowiseAI#9)

dockerfile-ntg modified to copy all working directory before calling pnpm install
Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/9
Reviewed-by: isameh <[email protected]>

* resolved comments, reverted CI/CD

* add test docker build yml back

* moved meilisearch to vector store folder

* Update Meilisearch.ts

---------

Co-authored-by: Henry <[email protected]>
Co-authored-by: Henry Heng <[email protected]>
patrickreinan pushed a commit to patrickreinan/Flowise that referenced this pull request Sep 3, 2024
* added meilisearch retriever and credentials.ts

* added semantic ratio

* removed a TODO implementatio

* meilisearch component implemented with searching and upsert functionality (FlowiseAI#3)

meilisearch retriever component created , searching for an existing index and upserting a new or existing index has been implemented , component utilizes langchain and meilisearch vector search

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/3
Reviewed-by: mohamed1999akram <[email protected]>

* added CI/CD for ntg branch, added proper dockerfile for flowise-ntg (FlowiseAI#4)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/4
Reviewed-by: mohammad <[email protected]>

* modified os version , removed linting errors , removed cypress github actions (FlowiseAI#5)

added --no-lock-file flag to pass CICD , made the runner run on debian and not ubuntu , removed code that caused warnings to pass linting

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/5
Reviewed-by: omaryassery <[email protected]>

* removed unnecessary QEMU install action (FlowiseAI#6)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/6
Reviewed-by: omaryassery <[email protected]>

* removed cypress installation and linting from dockerfile (FlowiseAI#7)

Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/7
Reviewed-by: isameh <[email protected]>

* dockerfile-ntg-modification (FlowiseAI#9)

dockerfile-ntg modified to copy all working directory before calling pnpm install
Reviewed-on: https://git.beyond.cc/ntg/flowise/pulls/9
Reviewed-by: isameh <[email protected]>

* resolved comments, reverted CI/CD

* add test docker build yml back

* moved meilisearch to vector store folder

* Update Meilisearch.ts

---------

Co-authored-by: Henry <[email protected]>
Co-authored-by: Henry Heng <[email protected]>
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.

2 participants