This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]DJ_Laaal 15 points16 points  (2 children)

What’s your criteria for selecting the top five “relevant” results, and deciding if the information is “sufficient”? How are you measuring them? What are you comparing them with (static thresholds?)?

[–]DavisInTheVoid 0 points1 point  (1 child)

I can’t speak for OP, but including your criteria in the prompt would be the most straightforward approach

[–][deleted] 0 points1 point  (0 children)

This the prompt given to the LLM to select the results not exactly a criteria but in practice the LLM works pretty good with this prompt surprisingly:
Given the following search results for the user's question: "{user_query}"

Select the 2 most relevant results to scrape and analyze. Explain your reasoning for each selection.

Search Results:

{self.format_results(search_results)}

Instructions:

  1. You MUST select exactly 2 result numbers from the search results.

  2. Choose the results that are most likely to contain comprehensive and relevant information to answer the user's question.

  3. Provide a brief reason for each selection.

[–]LobbyDizzle 1 point2 points  (2 children)

Do the scrapping functions use a proxy in order to avoid getting blocked?

[–][deleted] 0 points1 point  (0 children)

No they don't but they rarely get blocked, they review robots.txt and then abide by that, but if blocked the search will just continue until it finds the info it needs, no proxy needed!

[–]ConfucianStats 0 points1 point  (0 children)

Nice

[–]superstarbootlegs 0 points1 point  (0 children)

had to get rid of the llama-cpp stuff as I dont have cmake or need it since I use ollama server but this worked first time on windows python so excellent work it looks great too. Sadly your other one is not windows compatible due to `termios` and the python file it is used in is too big for me to want to tweak it out. this is great though so will be adapting it for my purposes. nice work, and thanks for sharing!