Skip to content

Instantly share code, notes, and snippets.

@gpupo
Last active May 10, 2024 18:13
Show Gist options
  • Save gpupo/4bf43c9e0ab47b6afc845dcb1312eedd to your computer and use it in GitHub Desktop.
Save gpupo/4bf43c9e0ab47b6afc845dcb1312eedd to your computer and use it in GitHub Desktop.
Uso de um LLM pequeno para melhoria de descrição de produto

Foi utilizado:

Teste realizado em Macbook Pro M1 8Gb

Nesse teste usei os dados de um produto da Amazon USA khadas 3705 Cooling Fan e busquei uma descrição de maior qualidade para o produto.

Tempo de execução desse prompt:

________________________________________________________
Executed in    2.35 secs      fish           external
   usr time  151.60 millis   80.00 micros  151.53 millis
   sys time   44.47 millis  614.00 micros   43.86 millis
   
   
from ollama import Client
client = Client(host="http://localhost:11434")
response = client.chat(
model="tinydolphin",
messages=[
{
"role": "user",
"content": """Create a alternative description to Improve this product description:
khadas 3705 Cooling Fan, Features:
High Airflow
Super Quiet
Compatibility:
Edge
Edge-V
VIM3
VIM2 v1.4
Edge Heatsink
New VIM Heatsink
Incompatible:
VIM1 (all versions)
VIM2 (v1.2 and earlier)
Original VIM Heatsink""",
},
],
)
print(response["message"]["content"])

Introducing the Khadas Cooling Fan, a sleek and stylish addition to your laptop that guarantees maximum airflow while being incredibly quiet. The super-quiet 3705 cooling fan is designed to keep your system at optimal temperatures without disturbing your work or comfort level.

Key features include:

  1. High Airflow: The Khadas Cooling Fan boasts a powerful fan speed of 4,800 RPM, which delivers significant air circulation.
  2. Super Quiet: With an noise reduction factor of 33 decibels (dB), the Khadas Cooling Fan ensures you'll never miss out on any important sounds while working or playing.

Compatibility with specifications:

  • The Khadas Cooling Fan is compatible with models such as:
    • Edge-V, VIM3, and VIM2 v1.4.
    • Edge Heatsink and New VIM Heatsink.
    • All versions of the VIM Heatsink.

In addition to being incredibly quiet, the Khadas Cooling Fan also comes with a new VIM Heatsink that is designed to be more efficient, durable, and reliable than its predecessor. The New VIM Heatsink provides up to 15% better heat dissipation and is engineered for long-lasting use.

The Khadas Cooling Fan also includes a new, superior.5mm diameter silvered heat sink that is designed to be more compact than the previous version, while maintaining a high level of thermal conductivity to ensure optimal cooling. The new heat sink offers superior to 90% better heat transfer compared to the previous version and is backed by a lifetime guarantee on its silvered surface.

In summary, the Khadas Cooling Fan is the perfect addition to your laptop that guarantees maximum airflow without disturbing your comfort or work environment. With high airflow, superior and super-quiet operation, this fan is worth every penny of its price.

@gpupo
Copy link
Author

gpupo commented May 9, 2024

Próximo passo, Aplicar RAG.

RAG, ou Retrieval-Augmented Generation, é uma técnica de geração de linguagem onde uma componente de recuperação de informações (como um mecanismo de busca) é usada para alimentar conteúdo relevante em um modelo gerador de linguagem. O RAG implica que ao invés de treinar o modelo para memorizar ou aprender diretamente os dados, você pode utilizar o RAG para consultar dinamicamente uma base de dados durante a geração de respostas, permitindo que o modelo utilize informações específicas sem a necessidade de um treinamento intensivo e especializado.

@gpupo
Copy link
Author

gpupo commented May 10, 2024

@gpupo
Copy link
Author

gpupo commented May 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment