Find answers from the community

A
Abhay
Offline, last seen 3 months ago
Joined September 25, 2024
TypeError: descriptor '_mongodb_client' for 'MongoDBAtlasVectorSearch' objects doesn't apply to a 'MongoDBAtlasVectorSearch' object

while using ingestion pipeline
pipeline = IngestionPipeline(
transformations=[
SentenceWindowNodeParser.from_defaults(window_size=3, window_metadata_key="window",original_text_metadata_key="original_sentence"),
QuestionsAnsweredExtractor(questions=2, num_workers=2),
CohereEmbedding(cohere_api_key=key,model_name='embed-english-v3.0'),
],
vector_store=MongoDBAtlasVectorSearch(
pymongo.MongoClient(mongouri),
db_name="abhay_new",
collection_name="abhay_vector_store",
index_name='abhay_new_index'
),
docstore= MongoDocumentStore.from_uri(uri=mongouri, db_name='abhay_new',),
docstore_strategy= DocstoreStrategy.UPSERTS_AND_DELETE
)
2 comments
L
Hey guys, had a small doubt...if we had to answer a question from two different sources and then combine the answer (giving the citation ), and we had to do it without creating two separate indexes, is there a way to do it?
Also, a follow up question, if both sources had two different answers (Conflicting basically), what to do exactly in that case? how to choose one over the other?
2 comments
A
W
A
Abhay
·

Hey guys,

Hey guys,
  1. can we save query engines state so that we don't have to re-initialize it with the rerankers or the indexes?
Assume the index is in a vector store and not in memory.
Mendable tells this MLesque answer
import pickle

Assuming 'query_engine' is your initialized query engine

with open('query_engine.pkl', 'wb') as f:
pickle.dump(query_engine, f)

To load the query engine later

with open('query_engine.pkl', 'rb') as f:
loaded_query_engine = pickle.load(f)
which i am not sure correct...
1 comment
L
A
Abhay
·

Hi guys,

Hi guys,
  1. GuidanceQuestionGenerator is giving this error?
1 comment
L
A
Abhay
·

Hi guys,

Hi guys,
  1. We tried to run AutoRetriever, but apparently even the tutorial didn't run effectively. The AutoRetriever is not applying the filters effectively.
Sometimes its applying the filter on wrong fields. Sometimes its applying too many filters.
Anyways to calm it down?
It's just too random. Can you tell us the best practices to run this AutoRetriever's filters automatically?
Also, what is the use of prompt template? It was not explained in the tutorial
2 comments
A
L
Also, one quick question : In the document management with the ingestion pipeline section, when we insert a new document through the ingestion pipeline, does it bring in the entire docstore in memory to compare ?
2 comments
L
Hi guys, cohere-3 rerank is out now. But the llamaindex cohere reranker doesn't have the "rank_fields" column. Is it possible to integrate it?
2 comments
A
W