I changed to the latest
langchain==0.0.102rc0
llama_index==0.4.21
And now it gives really nice results.
Its probably reaaaaaly basic what I am doing;
# set maximum input size
max_input_size = 4096
# set number of output tokens
num_outputs = 512
# set maximum chunk overlap
max_chunk_overlap = 40
# set chunk size limit
chunk_size_limit = 600
# define LLM
llm_predictor = LLMPredictor(llm=OpenAIChat(
temperature=0, model_name="gpt-3.5-turbo", max_tokens=num_outputs))
prompt_helper = PromptHelper(max_input_size,
num_outputs,
max_chunk_overlap,
chunk_size_limit=chunk_size_limit)
documents = SimpleDirectoryReader('amldata').load_data()
index = GPTSimpleVectorIndex(documents,
llm_predictor=llm_predictor,
prompt_helper=prompt_helper)
# save to disk
index.save_to_disk('./indexes/aml.json')