Changes to fix bugs in the original repository:
requirements.txtis updated to include nltkinitialize.pyexists to create a necessary folder and download an nltk resource- README updated accordingly (and also mentions needing to set your OPENAI_API_KEY)
This gets the earlier errors out of the way, but the list index out of range error remains:
Traceback (most recent call last):
File "C:\Users\[user]\Documents\GitHub\GEO\src\run_geo.py", line 108, in <module>
print(improve(k['query'], idx = int(k['sugg_idx']), impression_fn=impression_wordpos_count_simple))
File "C:\Users\[user]\Documents\GitHub\GEO\src\run_geo.py", line 84, in improve
summaries_copy = summaries[:idx] + [GEO_METHODS[meth_name](summaries[idx])] + summaries[idx+1:]
IndexError: list index out of range
GEO introduces optimization techniques to boost website visibility in generative engine responses.
The advent of large language models (LLMs) has ushered in a new paradigm of search engines that use generative models to gather and summarize information to answer user queries. These Generative Engines are reshaping search engines, promising personalized and precise responses to user queries. Yet, content creators grapple with a lack of control over how their content appears in these engines. Enter GENERATIVE ENGINE OPTIMIZATION (GEO), a solution that empowers content creators with a set of optimization strategies to enhance their online visibility. To evaluate GEO, we introduce GEO-BENCH, a collection of diverse user queries from different sources, each tagged with relevant categories and corresponding search resutls. Our experiments reveal that GEO can boost source visibility by up to 40%, offering practical insights for content creators. GEO heralds a new era in information discovery systems, promising profound implications for both search engine developers and content creators
- Create a conda environment: conda create -n geo python=3.9
- conda activate geo
- pip install -r requirements.txt
- Set
OPENAI_API_KEYenvironment variable
To replicate results in paper, simply run:
cd src
python initialize.py
python run_geo.pyYou can define custom GEO functions in src/geo_functions.py. Reference them in src/run_geo.py in GEO_METHODS variable, to evaluate on your new custom GEO function.
GEO-bench is hosted on huggingface, can be downloaded using:
from datasets import load_dataset
load_dataset('GEO-optim/geo-bench')Leaderboard is available at: https://huggingface.co/spaces/Pranjal2041/GEO-bench
@misc{aggarwal2023geo,
title={GEO: Generative Engine Optimization},
author={Pranjal Aggarwal and Vishvak Murahari and Tanmay Rajpurohit and Ashwin Kalyan and Karthik R Narasimhan and Ameet Deshpande},
year={2023},
eprint={2311.09735},
archivePrefix={arXiv},
primaryClass={cs.LG}
}