0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Docker Edition] Try LLM Vector Search with a Web Application

Last updated at Posted at 2025-01-04

nlp4j-web-vectorsearch

This is a web application for storing documents in a vector database and performing document searches within the vector database.

It also includes a keyword search function, allowing you to compare the results of vector searches against traditional keyword-based searches.

image.png

0. Prerequisites

You need an environment where Docker is operational.

1. Installation

1-1. Installing and Running the Embedding Server

Install the Multilingual-E5-large Embedding Server (nlp4j-llm-embeddings-e5).

Installation

docker pull oyahiroki/nlp4j-llm-embeddings-e5:1.0.0.0

Execution (The first run may take about 5 minutes due to downloading model files.)

docker run -d --name nlp4j-llm-embeddings-e5 -p 8888:8888 oyahiroki/nlp4j-llm-embeddings-e5:1.0.0.0

Example Output

>docker pull oyahiroki/nlp4j-web-vectorsearch:1.0.0.0
1.0.0.0: Pulling from oyahiroki/nlp4j-web-vectorsearch
cb57fedf0fd8: Download complete
80338217a4ab: Download complete
d1eecb43db8a: Download complete
b317c36e5a10: Download complete
1a5fd5c7e184: Download complete
b24483e35971: Download complete
5b1aa583d1ef: Download complete
10970da6d1d3: Download complete
90a925ab929a: Download complete
57bd701990a7: Download complete
7d9a34308537: Download complete
7478e0ac0f23: Download complete
4c7deb2ac32b: Download complete
727d8fc35079: Download complete
4f4fb700ef54: Already exists
edf7dd409191: Download complete
350cf53fd52a: Download complete
Digest: sha256:9640f3cd726ee2c04d9d422727ecafe59e55c253e6778e0948eabbc85845f762
Status: Downloaded newer image for oyahiroki/nlp4j-web-vectorsearch:1.0.0.0
docker.io/oyahiroki/nlp4j-web-vectorsearch:1.0.0.0
>

For detailed instructions, refer to the following article:

1-2. Installing and Running the Web Application

Installation

docker pull oyahiroki/nlp4j-web-vectorsearch:1.0.0.0

Execution

docker run -d --name nlp4j-web-vectorsearch -p 8983:8983 -p 8080:8080 oyahiroki/nlp4j-web-vectorsearch:1.0.0.0

Opening in a Browser

http://localhost:8080/nlp4j-web-vectorsearch/

You should see a screen like the one below:

image.png

For information about the image, refer to:

2. Usage

Storing Documents in the Vector Database

Enter any text into the text box and press "POST" to store it as a document.

Vector Search in the Vector Database

Enter any text into the text box and press "Vector Search" to execute a vector-based search.

In the example below, you can see that "NY" and "ニューヨーク" (New York in Japanese Language) are appropriately matched.

image.png

Miscellaneous

While the application is designed to run on environments with NVIDIA GPUs (with drivers installed), it has also been confirmed to work in non-NVIDIA environments.


[EOF]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?