mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-11 20:00:23 +01:00
[PR #85] [CLOSED] Feature: Get topic suggestions for new links #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/linsa-io/linsa/pull/85
Author: @wilmeragsgh
Created: 11/15/2023
Status: ❌ Closed
Base:
dev← Head:feature/url-topic-suggestions📝 Commits (5)
ca389c1feat: Add capturing of title+description for url-topics-suggestion1c728d7feat: Add qdrant access instead of vectorize and add grabase ai0b9cdf8feat[la-27]: Add init code for engine to get llama2 answers for a given global topic7ad0009chore: Remove debug console.logsa0fa897Merge branch 'dev' into feature/url-topic-suggestions📊 Changes
5 files changed (+114 additions, -0 deletions)
View changed files
📝
grafbase/generated/index.ts(+2 -0)📝
grafbase/grafbase.config.ts(+13 -0)➕
grafbase/resolvers/getGlobalTopicAnswer.ts(+30 -0)➕
grafbase/resolvers/getSuggestionsForUrl.ts(+68 -0)📝
package.json(+1 -0)📄 Description
This PR adds:
Changes
Grafbase resolver to get topic suggestions on a new link
Using a new link web page description from its meta tags we create an embedding for the link using the
baai/bge-large-en-v1.5model and search in a Qdrant instance to get the most similar GlobalTopic to the new link and suggest it.Grafbase resolver to get single questions answers from a global topic
Passing the topic name and question as arguments to it, we use
meta/llama-2-7b-chat-int8to set a prompt where the model is an expert on the given topic and answers questions on the said topic. The current setup only considers single questions answers, meaning it would not handle multi-step interactions yet.Limitations
The current setup only works on the web app as Grafbase ai workers integration does not work locally yet.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.