omi icon indicating copy to clipboard operation
omi copied to clipboard

Memories include relevant links ($100)

Open josancamon19 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. From the memory processing, extract the category, or topics to search relevant links for. If can't build a query from memory processing result, update the memory processing and include a parameter for "search" or smth like that, where it generates a query or list of queries from the memory.

Use https://serper.dev/

In order to generate the memory processing params json instructions for LLM, use langchain parser.

Example:

class Model(BaseModel):
    requires_context: str = Field(description='Based on the conversation, this tells if context is needed to answer',
                                  default=False)
    topics: List[str] = Field(description='If context is required, the topics to retrieve context from', default=[])
    dates_range: Optional[Tuple[datetime, datetime]] = Field(description='The dates range to retrieve context from', default=())


parser = PydanticOutputParser(pydantic_object=Model)
print(parser.get_format_instructions())

Some help on the query generation for LLM instructions I was using on a previous project:

def generate_google_search_query(user_input: str):
    return simple_prompt_request(f'''You are a Google Search Expert. You task is to convert unstructured user inputs to optimized Google search queries. Example: USER INPUT: 'Best places to visit in Colombia?' OPTIMIZED Google Search Query: 'Top 10 Colombia tourist destinations'.
    Convert the following user query into a optimized Google Search query: "{user_input}"''')

IMG_0002

josancamon19 avatar Jun 30 '24 19:06 josancamon19

As suggested, what if we just include a queries field in the summarizeMemory promot itself? And modifying the prompt a bit to generate possible search words, and then pass them to https://serper.dev

Screenshot 2024-07-18 at 12 54 22 PM

Should I go with this approach @josancamon19?

mdmohsin7 avatar Jul 18 '24 07:07 mdmohsin7

Okay just tried the above mentioned approach with a random video and I think it works!

Screenshot 2024-07-18 at 1 15 30 PM

mdmohsin7 avatar Jul 18 '24 07:07 mdmohsin7

@mdmohsin7 Are you still working on this?

chinmayajha avatar Feb 08 '25 18:02 chinmayajha

Hi @chinmayajha, AFAIK this is not a part of the bounties anymore. You can check the latest bounty issues

mdmohsin7 avatar Feb 09 '25 07:02 mdmohsin7

@addbounty $100

andrewgazelka avatar Feb 11 '25 03:02 andrewgazelka

banner button

Make a Draft PR early so others can see you are working on it! To automatically create one:

# Using npx (installed if you have NodeJS/npm)
npx bountybot start BasedHardware/omi#390

# Or, use cargo (installed if you have Rust)
cargo install bounty
bounty start BasedHardware/omi#390

When merged, you will receive the bounty!

addbounty avatar Feb 11 '25 03:02 addbounty