getzep / zep

Zep | The Memory Foundation For Your AI Stack
https://help.getzep.com/ce
Apache License 2.0
2.72k stars 390 forks source link

Intent and Entity Extraction Not Executing Automatically #115

Closed josiahbryan closed 1 year ago

josiahbryan commented 1 year ago

Hi!

I followed roughly your SDK page for Javascript at: https://docs.getzep.com/sdk/#sessions

  1. I loaded Zep with the example memory using the client.addMemory call
  2. I can get the memory for that same session using client.getMemory - that works great

However, neither client.getMemory nor client.searchMemory return any metadata including entities or intents anywhere in the object. (I just did JSON.stringify to dump the entire object from both calls to the console, no intents or entities, just the raw memory.

My .env file has no custom config in it other than the requisite ZEP_OPENAI_API_KEY=sk-... of course. However, I don't know what to turn on to actually get intent and entities since there are no config options shown in https://docs.getzep.com/deployment/config/#configuration-options regarding either intent or entities - I just see the extractors for summaries mentioned, obviously.

I do see that the NER extractor runs async (https://docs.getzep.com/extractors/#embedder-extractor), so I waited ~12 hours to check memory again - still no entities. Also, that page doesn't show anything about enabling/disabling extractors.

Here's the full result from getMemory for my test session:

{
  "messages": [
    {
      "uuid": "f4d3e883-70b5-4889-9dfa-43e322f40a40",
      "created_at": "2023-07-02T05:43:44.271938Z",
      "role": "human",
      "content": "Who was Octavia Butler?",
      "token_count": 8
    },
    {
      "uuid": "125c9f05-9fef-4f60-ac52-f2d987cfa4ef",
      "created_at": "2023-07-02T05:43:44.271938Z",
      "role": "ai",
      "content": "Octavia Estelle Butler (June 22, 1947 – February 24, 2006) was an American science fiction author.",
      "token_count": 31
    },
    {
      "uuid": "4ca16b7c-1451-4c79-bb3e-7c5d03b35d28",
      "created_at": "2023-07-02T05:43:44.271938Z",
      "role": "human",
      "content": "Which books of hers were made into movies?",
      "token_count": 11
    }
  ],
  "metadata": {}
}
danielchalef commented 1 year ago

Would you please share your log files? It might also be helpful to set the log level to 'debug'. See here for configuring this in either the config or environment: https://docs.getzep.com/deployment/config/

rsharath commented 1 year ago

Also could you please make sure you are running with zep-js v0.4.1? Thanks,

josiahbryan commented 1 year ago

Hey @danielchalef this seems to have been an issue with the wrong client - I was using zep-js instead of @getzep/zep-js - thanks @rsharath for the tip. Once I used the right client (and fixed the errors I mentioned in https://github.com/getzep/zep-js/issues/6 ), the client properly shows intent and entities in the resulting memory inspections, so this issue can be closed 👍