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

VertexAISearchRetriever return Japanese documents as Unicode #395

Open
Freezaa9 opened this issue Jul 24, 2024 · 0 comments
Open

VertexAISearchRetriever return Japanese documents as Unicode #395

Freezaa9 opened this issue Jul 24, 2024 · 0 comments

Comments

@Freezaa9
Copy link
Contributor

Freezaa9 commented Jul 24, 2024

HI,

We are currently benchmarking VertexAISearchRetriever against VectorSearchVectorStore

And we are working with document in japanese.

With VectorSearchVectorStore retriever we can retrieve the japanese document without problem,
but when we switch to VertexAISearchRetriever the page content in japanese is in unicode. While in the Vertex ai Search console in GCP we can visualize the document in normal Japanese.

The data store is created with one structuted jsonl file from GCS.

Code example:

query = "how does dior sauvage smell like ?"

retriever = VertexAISearchRetriever(    
    project_id=PROJECT_ID,
    location_id=LOCATION_ID,

    data_store_id=DATA_STORE_ID,
    max_documents=10,
    engine_data_type=1,
)

result = retriever.invoke(query)
for doc in result:
    print(doc)
    print(type(doc))
    print(doc.page_content)

What we retrieve:

page_content='{"content": "\u8a73\u7d30: \n\u30bd\u30f4\u30a1\u30fc\u30b8\u30e5 \u30d1\u30eb\u30d5\u30a1\u30f3\u306f\u3001\u3044\u3063\u305d\u3046\u6fc3\u539a\u306b\u8868\u73fe\u3055"}' metadata={'id': '5e73bbc4b8dc180d0836ab21d1f9b0ac', 'name': 'projects/XXXXXX/locations/XXXX/collections/default_collection/dataStores/XXXX/branches/0/documents/5e73bbc4b8dc180d0836ab21d1f9b0ac'}
<class 'langchain_core.documents.base.Document'>

Thanks for your help

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

No branches or pull requests

1 participant