Giter Club home page Giter Club logo

gptapps's People

Contributors

glorat avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

arjaygg

gptapps's Issues

feat: alternative qna algorithm

From GPT's own suggestion on this algorithm:

  1. Split the user-supplied content into smaller chunks or segments that fit within the maximum token limit. Each segment should have a context that makes sense independently.
  2. Start with the initial question and the first chunk of content. Send this as a prompt to the OpenAI API to get the answer for that specific context.
  3. Take the generated answer and append it to the context for the next chunk of content. Repeat this process until you have processed all the chunks.
  4. Finally, combine all the answers generated for each chunk to form a coherent response to the original question.

feat: advanced config feature to customise the system prompt

Currently, this is hardcoded to

Answer the question as truthfully as possible using the provided text, and if the answer is not contained within the text below, say "I don't know"

This seems to work well for most things but it could be tweakable to be better

feat: advanced config to hint the embed search where to look

The embeds search is relying on the content of the question to match against the content. But the question may lack sufficient search context - it may help to enhance the question with additional context specific to the question. In simple terms, it could act like a keyword search to find the right part of the document

E.g.
Q: What is the name of the buyer and seller
C: buyer, purchases, seller, supplier, agreement

fix: ensure call to createEmbeddings is retry-able

The embeddings endpoint has a generous rate limit but it can still be hit if the content is very long and a free account is being used. It should be wrapped with retry, just like the existin chatCompletion call

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.