Find answers from the community

Updated 2 years ago

Thank you for responding I read through

Thank you for responding. I read through all the docs and I just can't get it to work
M
T
4 comments
There are errors or you don't see any effect? Using the PromptHelper class?
I saw you have a few months of experience. Are you using a https://docs.python.org/3/library/venv.html virtualenv? Takes care of import errors, very good practice ๐Ÿ™‚

Here's my PromptHelper snippet

from langchain.embeddings.huggingface import HuggingFaceEmbeddings
from gpt_index import (
GPTSimpleVectorIndex,
SimpleDirectoryReader,
LangchainEmbedding,
PromptHelper,
)
prompt_helper = PromptHelper(4096, 256, 0)
embed_model = LangchainEmbedding(HuggingFaceEmbeddings())
index = GPTSimpleVectorIndex(
documents,
chunk_size_limit=chunk_size,
embed_model=embed_model,
prompt_helper=prompt_helper,
)
Thank you. I think I found the issue. I think the problem is with the Finnish alphabet and the way they're encoded in the embeddings. When asking from my Finnish documents I get rejected responses from questions such as: "Who signed the filing" due to excessive length.

In the English version I can ask questions like this: "Who signed the filing and what do they do and write a poem on them?" And it will answer it perfectly (even with a very long poem completion).

I tried using PromptHelper but still had the same issues. I wonder if you have experienced the same?
I have not extensively worked with Finnish text yet, but I'm going to next week. I'll see how it goes.
Add a reply
Sign up and join the conversation on Discord