I'm trying to implement a simple rag that reads a list of input files and answers to questions based on their content:
documents = SimpleDirectoryReader("/content/Data/").load_data()llm = LlamaCPP( model_url='https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf', model_path=None, temperature=0.1, max_new_tokens=256, context_window=3900, generate_kwargs={}, model_kwargs={"n_gpu_layers": -1}, messages_to_prompt=messages_to_prompt, completion_to_prompt=completion_to_prompt, verbose=True,)embed_model = HuggingFaceEmbeddings( model_name="thenlper/gte-large")service_context = ServiceContext.from_defaults( chunk_size=256, llm=llm, embed_model=embed_model)index = VectorStoreIndex.from_documents(documents, service_context=service_context)query_engine = index.as_query_engine()response = query_engine.query("What is the quantity of Nokia 3310 available?")
But I noticed that the model is not able to answer to questions regarding the json files within the Data folder, while it's great for pdf. Why does it happen and how can I solve? I notice that documents contains the json too, so I think it's not related to the first line of code but probably to the one for index.Thank you in advance, if you need more information ask me