Live data from Hacker News

Introducing Agents in Haystack: Make LLMs resolve complex tasks

haystack.deepset.ai

71–80 of 106 posts

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#71
post #62

Earlier quoted context omitted.

But intelligence *is* being able to make predictions! That's the entire reason we evolved intelligence! (Not words, but the world around us, sure, but apparently language makes a pretty good map)

Prediction is a faction of cognition. There’s a theory of self, perception, sensory fusion, incremental learning, emotions, a world model, communication and a sense of consequences, desire for self preservation and advancement, self-analysis and reflection, goal setting, reward-driven behavior, and so many more aspects that are missing from “predict the next word.”

And how many of those are obvious applications of prediction, where prediction is the hard part?

World model: This is what prediction is based on. That's what models are for.

Sense of consequences: prediction of those consequences, obviously.

Desire for self preservation: prediction; avoiding world states predicted to be detrimental to achieving one's goals.

Goal setting: prediction; predicting which subgoals steer the world towards achieving one's supergoal(s).

Reward-driven behavior: fundamentally interweaved with prediction. Not only is it all about predicting what behaviors are rewarded, the reward or lack thereof is then used to update the agent's model to make better predictions.

There's even a theory of cognition that all motor control is based on prediction: the brain first predicts a desired state of the world, and the nervous system then controls the muscles to fulfill that prediction!

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#72

Somewhat OT, but I feel like this is such an underappreciated aspect of recent LLMs: Not just their ability to generate text - but their apparent effectiveness in making use of arbitrary tools to interact with their environment to achieve some goal. It seems like we're just at the beginning of this with the MRKL and ReAct papers, there will be a ton more awesomeness coming in this area I'm sure.

Yes I think if this works it's one of the strongest signals yet that LLMs as they currently exist have a fairly general form of intelligence.

I am pretty sympathetic to the field of "AI Safety" and I worry a lot about the implications of agent-like general intelligences. This post gives me a lot to ponder.

What are the implications of the fact that even AIs that are not agent-like at heart can apparently be told "please simulate an agent-like AI"? I really don't know. Should we consider it as an "inner AI" with its own objectives? How can we determine what those objectives are?

Instinctively it feels much less concerning than an AI with a direct action->perception feedback loop but who knows. AI is fucking weird.

What a thrilling time to be alive!

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#75

If you (like me) were wondering how these works, the LLM is given a prompt like: Answer the following questions as best you can. You have access to the following tools: Search: Use this to search the internet. Calculator: Use this to do math. Use the following format: Question: the input question you must answer Thought: you should always think about what to do Action: the action to take, should be one of [{tool_name…

Does observation cover reflexion? Self-observation or is that something else? Or maybe before Final Answer, you could do: Double Check: I think I have the final answer, but does it look right? IF yes: go to final answer if no: Go back up the loop.

For those interested in an explainer in reflexion (asking the LLM if it made an error and allowing it to correct itself) I found this breakdown useful: https://youtu.be/5SgJKZLBrmg

> GPT 4 can self-correct and improve itself. With exclusive discussions with the lead author of the Reflexions paper, show how significant this will be across a variety of tasks, and how you can benefit.

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#76
Thanks for the spotlight :) We've spent quite a lot of time working on the Agents lately, and it's definitely a big focus. Couple of extra points to reflect on some of the comments here. It's quite straightforward to build a hybrid NLP backend with Haystack combining either hosted LLM (e.g., OpenAI or Cohere), or local, smaller Transformer models, or both. Agents add another level of control on top of that, as described in the article and in the comments. This provides more flexibility wrt bridging it to the relevant data and extract/generate accurate non-hallucinatory answers. Join our Discord too :) https://haystack.deepset.ai/community

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#78

Earlier quoted context omitted.

Is ChatGPT plugins using something comparable to this under the hood?

Yes and no. Whatever they are doing seems more robust than anything else I have tried. Especially with being able to bring context in the conversation to later invocations of tools. I haven't managed to get langchain to do that well.

With Haystack you can also combine the use of [hosted] LLMs and smaller, local models, and different pipelines under the Agent too.

Re: Introducing Agents in Haystack: Make LLMs resolve complex tasks

#79
post #10

I haven't yet figured out how to get an LLM to accurately determine whether it actually knows something or is making it up. I wonder how they handle that. They may get to that at some point in the article, but the page eventually breaks for me on mobile and I can't read past the first code block.

That's also one of the ideas behind using so-called retrieval-based augmentation. You can 'plug' an LLM like OpenAI's one (of Cohere, or a combo) to your data and make it provide accurate answers, but still leveraging all the benefits and power or a cutting-edge generative model. Check this https://twitter.com/deepset_ai/status/1625495149446062081 or this https://twitter.com/deepset_ai/status/1621161534243368961
Post reply on HN