Find answers from the community

Updated 3 months ago

can the `ReactAgent` work with

can the ReactAgent work with unstructured text that I bring with documents = SimpleDirectoryReader(input_dir=docs_folder, recursive=True).load_data() and then vectorise vector_store = ChromaVectorStore(chroma_collection=chroma_collection) storage_context = StorageContext.from_defaults(vector_store=vector_store) try: index = VectorStoreIndex.from_vector_store(vector_store, storage_context=storage_context) index_loaded = True except: index_loaded = False if not index_loaded: index = VectorStoreIndex.from_documents(documents, storage_context=storage_context) index.storage_context.persist() query_engine = index.as_query_engine(similarity_top_k=5)
W
I
3 comments
Yeah it should work
I always get the same for example I ask: what is the Storybook theme ?

Observation: Storybook theme is a tool that helps you read unstructured documents by providing a visual representation of the layout and components of the document.

Action: Use Storybook (if applicable).

Action Input: { "type": "object", "properties": {"input": {"title": "Input", "type": "string"}}, "required": ["input"]} I even use the same naming on the document "Storybook" to ask about the title name only using one document StoryBook = QueryEngineTool( query_engine=query_engine, metadata=ToolMetadata( name="Storybook", description="Tool to read unstructured documents.", ), ) self.tools.append(StoryBook) #context = "Act as a question answering bot which uses the context mentioned and answer in a concise manner and doesn't make stuff up" self.llm = Ollama(model="gemma:2b-instruct-q3_K_L", request_timeout=90.0) self.agent = ReActAgent.from_tools(tools=self.tools, llm=self.llm, verbose=True) it doesn't work I am lost
Maybe I need a custom agent but is weird because unstructured text should be something built in in my opinion. Also I am using ReacAgent because I want to possibly add other tools as I go ReactAgent seems to be more flexible and expandable on paper
Add a reply
Sign up and join the conversation on Discord